tests: mark the hancom office suite tests for rerun on failures

It seem that these tests are flaky, and as a result our CI pipeline is
failing from time to time. This will rerun it automatically when there
is an error.

See https://github.com/freedomofpress/dangerzone/issues/968 for more
information
This commit is contained in:
Alexis Métaireau 2024-11-06 16:18:55 +01:00
parent 91932046f5
commit 246624d687
No known key found for this signature in database
GPG key ID: C65C7A89A8FFC56E
3 changed files with 19 additions and 2 deletions

19
poetry.lock generated
View file

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
[[package]] [[package]]
name = "altgraph" name = "altgraph"
@ -865,6 +865,21 @@ pytest = "*"
dev = ["pre-commit", "tox"] dev = ["pre-commit", "tox"]
doc = ["sphinx", "sphinx-rtd-theme"] doc = ["sphinx", "sphinx-rtd-theme"]
[[package]]
name = "pytest-rerunfailures"
version = "14.0"
description = "pytest plugin to re-run tests to eliminate flaky failures"
optional = false
python-versions = ">=3.8"
files = [
{file = "pytest-rerunfailures-14.0.tar.gz", hash = "sha256:4a400bcbcd3c7a4ad151ab8afac123d90eca3abe27f98725dc4d9702887d2e92"},
{file = "pytest_rerunfailures-14.0-py3-none-any.whl", hash = "sha256:4197bdd2eaeffdbf50b5ea6e7236f47ff0e44d1def8dae08e409f536d84e7b32"},
]
[package.dependencies]
packaging = ">=17.1"
pytest = ">=7.2"
[[package]] [[package]]
name = "pytest-subprocess" name = "pytest-subprocess"
version = "1.5.2" version = "1.5.2"
@ -1084,4 +1099,4 @@ type = ["pytest-mypy"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = ">=3.9,<3.13" python-versions = ">=3.9,<3.13"
content-hash = "7597b82b4ab7e34f21ee61ea8180fd525d60e39a8b1d59f080c4bb8fd209c49b" content-hash = "b6afd7423076e732c1435f4b88ced44f23fa7dcbcdc17fb404adc159d5ae0c34"

View file

@ -52,6 +52,7 @@ pytest-qt = "^4.2.0"
pytest-cov = "^5.0.0" pytest-cov = "^5.0.0"
strip-ansi = "*" strip-ansi = "*"
pytest-subprocess = "^1.5.2" pytest-subprocess = "^1.5.2"
pytest-rerunfailures = "^14.0"
[tool.poetry.group.container.dependencies] [tool.poetry.group.container.dependencies]
pymupdf = "1.24.11" # Last version to support python 3.8 (needed for Ubuntu Focal support) pymupdf = "1.24.11" # Last version to support python 3.8 (needed for Ubuntu Focal support)

View file

@ -335,6 +335,7 @@ class TestCliConversion(TestCliBasic):
class TestExtraFormats(TestCli): class TestExtraFormats(TestCli):
@for_each_external_doc("*hwp*") @for_each_external_doc("*hwp*")
@pytest.mark.flaky(reruns=2)
def test_hancom_office(self, doc: str) -> None: def test_hancom_office(self, doc: str) -> None:
if is_qubes_native_conversion(): if is_qubes_native_conversion():
pytest.skip("HWP / HWPX formats are not supported on this platform") pytest.skip("HWP / HWPX formats are not supported on this platform")