openpreserve / jpylyzer

JP2 (JPEG 2000 Part 1) validator and properties extractor. Jpylyzer was specifically created to check that a JP2 file really conforms to the format's specifications. Additionally jpylyzer is able to extract technical characteristics.
http://jpylyzer.openpreservation.org/
Other
69 stars 28 forks source link

jpylyzer FTBFS: test_get_files failure #165

Open malaterre opened 4 years ago

malaterre commented 4 years ago
https://buildd.debian.org/status/fetch.php?pkg=jpylyzer&arch=all&ver=2.0.0-2&stamp=1582319718&raw=0

...
   dh_auto_test -i -O--buildsystem=pybuild
I: pybuild base:217: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7/build; python3.7 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.7.6, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
rootdir: /<<PKGBUILDDIR>>
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
====================== 1 failed, 8 passed in 0.10 seconds ======================
E: pybuild pybuild:341: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7/build; python3.7 -m pytest tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.7 returned exit code 13
make: *** [debian/rules:4: build-indep] Error 25

ref:

bitsgalore commented 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?

bitsgalore commented 2 years ago

Is this still happening with the latest Python version, or can I close this issue?

malaterre commented 2 years ago

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
bitsgalore commented 2 years ago

OK, I'll leave the issue open then, thanks for confirming this. (Still can't reproduce this on my own system, very strange.)