mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-10 21:26:07 +00:00
chore(python): use pytest-rerunfailures
instead of flaky
Since it supports re-running all failures that match certain expressions: https://github.com/pytest-dev/pytest-rerunfailures?tab=readme-ov-file#re-run-all-failures-matching-certain-expressions [no changelog]
This commit is contained in:
parent
0efb201d6b
commit
301190db4c
28
poetry.lock
generated
28
poetry.lock
generated
@ -549,17 +549,6 @@ tomli = {version = ">=1.2.1", markers = "python_version < \"3.11\""}
|
||||
[package.extras]
|
||||
pyproject = ["Flake8-pyproject"]
|
||||
|
||||
[[package]]
|
||||
name = "flaky"
|
||||
version = "3.8.1"
|
||||
description = "Plugin for pytest that automatically reruns flaky tests."
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
files = [
|
||||
{file = "flaky-3.8.1-py2.py3-none-any.whl", hash = "sha256:194ccf4f0d3a22b2de7130f4b62e45e977ac1b5ccad74d4d48f3005dcc38815e"},
|
||||
{file = "flaky-3.8.1.tar.gz", hash = "sha256:47204a81ec905f3d5acfbd61daeabcada8f9d4031616d9bcb0618461729699f5"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "graphviz"
|
||||
version = "0.19.1"
|
||||
@ -1294,6 +1283,21 @@ files = [
|
||||
[package.dependencies]
|
||||
pytest = ">=3.0.0"
|
||||
|
||||
[[package]]
|
||||
name = "pytest-rerunfailures"
|
||||
version = "15.0"
|
||||
description = "pytest plugin to re-run tests to eliminate flaky failures"
|
||||
optional = false
|
||||
python-versions = ">=3.9"
|
||||
files = [
|
||||
{file = "pytest-rerunfailures-15.0.tar.gz", hash = "sha256:2d9ac7baf59f4c13ac730b47f6fa80e755d1ba0581da45ce30b72fb3542b4474"},
|
||||
{file = "pytest_rerunfailures-15.0-py3-none-any.whl", hash = "sha256:dd150c4795c229ef44320adc9a0c0532c51b78bb7a6843a8c53556b9a611df1a"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
packaging = ">=17.1"
|
||||
pytest = ">=7.4,<8.2.2 || >8.2.2"
|
||||
|
||||
[[package]]
|
||||
name = "pytest-timeout"
|
||||
version = "2.3.1"
|
||||
@ -1916,4 +1920,4 @@ test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-it
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.9"
|
||||
content-hash = "1257cb4cd905c3a00c46535ffa5767cf7bc5af0ac33b80f0adbd5776a8c49d31"
|
||||
content-hash = "c1e9b094e97f629a43034cf7d81051443b2345af342db123b0e5038845dc9c03"
|
||||
|
@ -15,7 +15,6 @@ nanopb = "^0.4.3"
|
||||
## test tools
|
||||
pytest = "^8"
|
||||
coverage = "<5" # coverage 5+ uses binary sqlite format
|
||||
flaky = ">3.6.1" # https://github.com/box/flaky/issues/156
|
||||
pytest-ordering = "*"
|
||||
pytest-random-order = "*"
|
||||
pytest-timeout = "*"
|
||||
@ -77,6 +76,7 @@ trezor-pylint-plugin = {path = "./tools/trezor-pylint-plugin", develop = true}
|
||||
trezor-core-tools = {path = "./core/tools", develop = true}
|
||||
flake8-annotations = "^3.1.1"
|
||||
pyelftools = "^0.32"
|
||||
pytest-rerunfailures = "^15.0"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
scan-build = "*"
|
||||
|
@ -25,7 +25,7 @@ from trezorlib.tools import H_
|
||||
|
||||
pytestmark = [
|
||||
pytest.mark.models("legacy"),
|
||||
pytest.mark.flaky(max_runs=5),
|
||||
pytest.mark.flaky(reruns=5),
|
||||
]
|
||||
|
||||
|
||||
|
@ -88,7 +88,7 @@ def test_busy_expiry_core(client: Client):
|
||||
_assert_busy(client, False)
|
||||
|
||||
|
||||
@pytest.mark.flaky(max_runs=5)
|
||||
@pytest.mark.flaky(reruns=5)
|
||||
@pytest.mark.models("legacy")
|
||||
def test_busy_expiry_legacy(client: Client):
|
||||
_assert_busy(client, False)
|
||||
|
Loading…
Reference in New Issue
Block a user