wtclarke / pymapvbvd

Python port of mapVBVD
MIT License
40 stars 25 forks source link

Tests appear to hang forever #30

Closed musicinmybrain closed 1 year ago

musicinmybrain commented 1 year ago
python3 -m venv _e
. _e/bin/activate
pip install -e .
python -m pytest -v
============================= test session starts ==============================
platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.2.0 -- /home/ben/src/pymapvbvd/_e/bin/python
cachedir: .pytest_cache
rootdir: /home/ben/src/pymapvbvd
collected 9 items                                                              

tests/test_flags.py::test_flagRemoveOS 

Hangs forever; when interrupted, prints:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/home/ben/src/pymapvbvd/mapvbvd/read_twix_hdr.py:165: KeyboardInterrupt
(to show a full traceback on KeyboardInterrupt use --full-trace)
============================ no tests ran in 28.49s ============================

The Python version does not seem to matter; I have tried 3.11 and 3.7.

If I pass -k 'not test_FlagRemoveOS', then the next test (test_flagIgnoreSeg_flagDoAverage) hangs, and so on.

Am I missing anything here?

With --full-trace, I get the following when I interrupt the test:

test-hang.log

wtclarke commented 1 year ago

Did you use git LFS to download the test data? If not then the supposed data files will just be a tracking hash.

alexcraven commented 1 year ago

FWIW, I'm fairly sure my latest commit 6a7ad51 will handle this scenario more elegantly (warnings and premature stop, rather than endlessly reading the same few bytes over and over again)

(but of course it won't identify or fix the underlying test data)

musicinmybrain commented 1 year ago

Did you use git LFS to download the test data? If not then the supposed data files will just be a tracking hash.

No; I will do that. I didn’t recognize that files tracked with git LFS are not included in archives by default, and I should have looked more closely at the test data. I appreciate the effort to improve the behavior in this scenario.

musicinmybrain commented 1 year ago

Confirmed: the tests pass with the correct test data. Thanks!