Rerun flaky profiler tests on failure (#10035)
This commit is contained in:
parent
f0b3e0f4de
commit
2ed92ecabb
|
@ -1,6 +1,7 @@
|
|||
coverage>5.2.0
|
||||
codecov>=2.1
|
||||
pytest>=6.0
|
||||
pytest-rerunfailures>=10.2
|
||||
check-manifest
|
||||
twine==3.2
|
||||
mypy>=0.900
|
||||
|
|
|
@ -52,6 +52,7 @@ def simple_profiler():
|
|||
return SimpleProfiler()
|
||||
|
||||
|
||||
@pytest.mark.flaky(reruns=3)
|
||||
@pytest.mark.parametrize(["action", "expected"], [("a", [3, 1]), ("b", [2]), ("c", [1])])
|
||||
def test_simple_profiler_durations(simple_profiler, action: str, expected: list):
|
||||
"""Ensure the reported durations are reasonably accurate."""
|
||||
|
@ -65,6 +66,7 @@ def test_simple_profiler_durations(simple_profiler, action: str, expected: list)
|
|||
np.testing.assert_allclose(simple_profiler.recorded_durations[action], expected, rtol=0.2)
|
||||
|
||||
|
||||
@pytest.mark.flaky(reruns=3)
|
||||
@pytest.mark.parametrize(["action", "expected"], [("a", [3, 1]), ("b", [2]), ("c", [1])])
|
||||
def test_simple_profiler_iterable_durations(simple_profiler, action: str, expected: list):
|
||||
"""Ensure the reported durations are reasonably accurate."""
|
||||
|
@ -159,6 +161,7 @@ def advanced_profiler(tmpdir):
|
|||
return AdvancedProfiler(dirpath=tmpdir, filename="profiler")
|
||||
|
||||
|
||||
@pytest.mark.flaky(reruns=3)
|
||||
@pytest.mark.parametrize(["action", "expected"], [("a", [3, 1]), ("b", [2]), ("c", [1])])
|
||||
def test_advanced_profiler_durations(advanced_profiler, action: str, expected: list):
|
||||
|
||||
|
@ -173,6 +176,7 @@ def test_advanced_profiler_durations(advanced_profiler, action: str, expected: l
|
|||
np.testing.assert_allclose(recored_total_duration, expected_total_duration, rtol=0.2)
|
||||
|
||||
|
||||
@pytest.mark.flaky(reruns=3)
|
||||
@pytest.mark.parametrize(["action", "expected"], [("a", [3, 1]), ("b", [2]), ("c", [1])])
|
||||
def test_advanced_profiler_iterable_durations(advanced_profiler, action: str, expected: list):
|
||||
"""Ensure the reported durations are reasonably accurate."""
|
||||
|
|
Loading…
Reference in New Issue