mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
![]() The platform where we run our tests directly affects the isolation providers we can choose. For instance, we cannot run Qubes tests on a Windows/macOS platform, nor can we spawn containers in a Qubes platform, if the `QUBES_CONVERSION` envvar has been specified. This platform incompatibility was never an issue before, because Dangerzone is capable of selecting the proper isolation provider under the hood. However, with the addition of tests that target specific isolation providers, it's possible that we may run by mistake a test that does not apply to our platform. To counter this, we employed `pytest.skipif()` guards around classes, but we may omit those by mistake. Case in point, the `TestContainer` class does not have such a guard, which means that we attempt to run this test case on Qubes and it fails. Add module-level guards in our isolation provider tests using pytest's `pytest.skip("...", allow_module_level=True)` function, so that we make such restrictions more explicit, and less easy to forget when we add a new class. |
||
---|---|---|
.. | ||
__init__.py | ||
base.py | ||
test_container.py | ||
test_dummy.py | ||
test_qubes.py |