Skip to content

Commit fad1532

Browse files
committed
test: use pytest-reruns instead of flaky
1 parent 3eef22c commit fad1532

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ dependencies:
6363
- pytest >=3.6
6464
- pytest-cov >=2.2.0
6565
- pytest-mock
66+
- pytest-rerunfailures
6667
- setuptools-scm
6768
- shellcheck
6869
- typer
6970
- typer-cli
70-
- flaky
7171
# docs
7272
- pygments >=1.5
7373
- sphinx

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ server =
8585
tornado-m2crypto
8686
importlib_resources
8787
testing =
88-
flaky
8988
hypothesis
9089
mock
9190
parameterized
9291
pytest
9392
pytest-cov
9493
pytest-mock
94+
pytest-rerunfailures
9595
pycodestyle
9696

9797
[options.entry_points]

src/DIRAC/Core/Utilities/test/Test_Profiler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from subprocess import Popen
66

77
import pytest
8-
from flaky import flaky
98

109
import DIRAC
1110
from DIRAC.Core.Utilities.Profiler import Profiler
@@ -78,7 +77,7 @@ def test_base():
7877
assert resWC["Value"] >= res["Value"]
7978

8079

81-
@flaky(max_runs=10, min_passes=2)
80+
@pytest.mark.flaky(reruns=10)
8281
def test_cpuUsage():
8382
mainProcess = Popen(
8483
[

src/DIRAC/FrameworkSystem/private/standardLogging/test/Test_Logging_GetSubLogger.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test SubLogger
33
"""
44
import pytest
5-
from flaky import flaky
65
from DIRAC.FrameworkSystem.private.standardLogging.LogLevels import LogLevels
76

87

@@ -52,7 +51,7 @@ def test_getSubLoggerObject():
5251
# Run the tests for all the log levels and exceptions
5352
# We may need to rerun the test if we are unlucky and the timestamps
5453
# don't match
55-
@flaky(max_runs=3)
54+
@pytest.mark.flaky(reruns=3)
5655
@pytest.mark.parametrize("logLevel", ["exception"] + [lvl.lower() for lvl in LogLevels.getLevelNames()])
5756
def test_localSubLoggerObject(logLevel):
5857
"""

0 commit comments

Comments
 (0)