Open malaterre opened 4 years ago
This probably won't help much, but I just tried running the tests manually on my machine at home, which has Python 3.6.9:
python3 -m pytest tests
Result:
============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-5.2.1, py-1.8.0, pluggy-0.13.0
rootdir: /home/johan/jpylyzer
collected 9 items
tests/unit/test_jpylyzer.py ......... [100%]
============================== 9 passed in 0.21s ==============================
So this all works as expected. As an additional test I then deliberately changed getFiles('./*')
in 'test_jpylyzer.py' to an non-existing directory, and then ran the tests again. In this case I do end up with the same AssertionError that you're reporting. This makes me wonder if <<PKGBUILDDIR>>
is pointing to the expected (or even an existing) directory in your build process?
Is this still happening with the latest Python version, or can I close this issue?
I can reproduce it today:
I: pybuild base:232: cd /home/mathieu/debian/jpylyzer/.pybuild/cpython3_3.9/build; python3.9 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.9.2, pytest-6.0.2, py-1.10.0, pluggy-0.13.0
rootdir: /home/mathieu/debian/jpylyzer
plugins: flake8-1.0.6
collected 9 items
tests/unit/test_jpylyzer.py ........F [100%]
=================================== FAILURES ===================================
________________________________ test_get_files ________________________________
def test_get_files():
assert not EXISTING_FILES
getFiles('./*')
> assert EXISTING_FILES
E assert []
tests/unit/test_jpylyzer.py:52: AssertionError
=========================== short test summary info ============================
FAILED tests/unit/test_jpylyzer.py::test_get_files - assert []
========================= 1 failed, 8 passed in 0.05s ==========================
E: pybuild pybuild:353: test: plugin distutils failed with: exit code=1: cd /home/mathieu/debian/jpylyzer/.pybuild/cpython3_3.9/build; python3.9 -m pytest tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.9 returned exit code 13
OK, I'll leave the issue open then, thanks for confirming this. (Still can't reproduce this on my own system, very strange.)
ref: