4.1.0: pytest is failing

Bug #1940982 reported by Tomasz Kloczko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hacking
New
Undecided
Unassigned

Bug Description

I'm trying to package your module as rpm packag. So I'm using typical in such case build, install and test cycle used on building package from non-root account:
- "setup.py build"
- "setup.py install --root </install/prefix>"
- "pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

May I ask for help because few units are failing:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-hacking-4.1.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-hacking-4.1.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=1505954432
rootdir: /home/tkloczko/rpmbuild/BUILD/hacking-4.1.0
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, xprocess-0.18.1, black-0.3.12, anyio-3.3.0, Faker-8.11.0, asyncio-0.15.1, trio-0.7.0, httpbin-1.0.0, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, randomly-3.8.0
collected 33 items

hacking/tests/checks/test_other.py .......... [ 30%]
hacking/tests/checks/test_except_checks.py ..... [ 45%]
hacking/tests/test_config.py .. [ 51%]
hacking/tests/test_doctest.py F [ 54%]
hacking/tests/checks/test_comments.py ........ [ 78%]
hacking/tests/test_import_exceptions.py .. [ 84%]
hacking/tests/checks/test_mock.py ..... [100%]

================================================================================= FAILURES =================================================================================
_______________________________________________________________________ HackingTestCase.test_flake8 ________________________________________________________________________
'NoneType' object is not iterable

During handling of the above exception, another exception occurred:
NOTE: Incompatible Exception Representation, displaying natively:

testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/tkloczko/rpmbuild/BUILD/hacking-4.1.0/hacking/tests/test_doctest.py", line 40, in test_flake8
    f.write(''.join(self.lines))
AttributeError: 'HackingTestCase' object has no attribute 'lines'
========================================================================= short test summary info ==========================================================================
FAILED hacking/tests/test_doctest.py::HackingTestCase::test_flake8
======================================================================= 1 failed, 32 passed in 0.45s =======================================================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.