mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
tests: Skip a test for missing OCR files on Qubes
We have a container-specific test that deals with missing OCR files in the container image. This test _can_ be run under Qubes, and it may fail since it requires Podman. Make the pytest guard more strict and don't allow running this test on Qubes. Also, fix a typo in the word "omission".
This commit is contained in:
parent
c89ef580e0
commit
4ea0650f42
1 changed files with 6 additions and 2 deletions
|
@ -5,6 +5,7 @@ from pathlib import Path
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from dangerzone.isolation_provider.container import Container
|
from dangerzone.isolation_provider.container import Container
|
||||||
|
from dangerzone.isolation_provider.qubes import is_qubes_native_conversion
|
||||||
from dangerzone.logic import DangerzoneCore
|
from dangerzone.logic import DangerzoneCore
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,8 +13,11 @@ from dangerzone.logic import DangerzoneCore
|
||||||
# NOTE: We skip running this test on Windows/MacOS, because our current CI cannot run
|
# NOTE: We skip running this test on Windows/MacOS, because our current CI cannot run
|
||||||
# Docker in these platforms. It's not a problem anyways, because the result should be
|
# Docker in these platforms. It's not a problem anyways, because the result should be
|
||||||
# the same in all container-based platforms.
|
# the same in all container-based platforms.
|
||||||
@pytest.mark.skipif(platform.system() != "Linux", reason="Container-specific")
|
@pytest.mark.skipif(
|
||||||
def test_ocr_ommisions() -> None:
|
platform.system() != "Linux" or is_qubes_native_conversion(),
|
||||||
|
reason="Container-specific",
|
||||||
|
)
|
||||||
|
def test_ocr_omissions() -> None:
|
||||||
# Create the command that will list all the installed languages in the container
|
# Create the command that will list all the installed languages in the container
|
||||||
# image.
|
# image.
|
||||||
command = [Container.get_runtime(), "run"]
|
command = [Container.get_runtime(), "run"]
|
||||||
|
|
Loading…
Reference in a new issue