Closed almet closed 3 weeks ago
The tests are currently failing, I believe because of the way they are run. I'm exploring how to use pytest xdist to have them run in separate processes.
It turns out the tests weren't able to import the fixtures because they were not defined in the correct conftest.py
file, where pytest is looking for them. I moved them (and the other utilities that were lying in the __init__.py
files, which hopefully should be enough for it to work.
I believe the current tests are failing because of #801, so it is not related to these changes.
I would be interested to have more information about why the tests were run in separate processes, as mentioned in https://github.com/freedomofpress/dangerzone/issues/493.
Especially, I would like to try to reproduce the issue, as the changes on how we load and use the fixtures might fix it.
The tests pass locally in my machine. However, if I specifically try to run pytest -v tests/gui/
(at least in Ubuntu Focal), it fails. Are you seeing something similar?
The tests pass locally in my machine. However, if I specifically try to run pytest -v tests/gui/ (at least in Ubuntu Focal), it fails. Are you seeing something similar?
I can't reproduce, (un)fortunately, Here are the comments I'm running and the output:
./dev_scripts/env.py --distro ubuntu --version focal build-dev
./dev_scripts/env.py --distro ubuntu --version focal run --dev bash -c "cd dangerzone; poetry run pytest -v tests/gui"
Interesting, I rebuilt my Ubuntu Focal dev environment, and I can't reproduce it as well. It could be due to the PySide6 / Python3 update. Let's hope we'll never have to find out :slightly_smiling_face:
Feel free to merge, thanks!
Fixtures should find their way by themselves, as mentioned in the pytest docs.
The tests are currently failing, I believe because of the way they are run. I'm exploring how to use pytest xdist to have them run in separate processes.