Skip to content

Commit

Permalink
Update flaky test annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipMay committed Jan 6, 2024
1 parent fcfc8dc commit 2f1859c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@
from .ori_data_loader import load_colon_data, load_leukemia_data, load_prostate_data


@pytest.mark.flaky(reruns=3, reruns_delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=30)
def test_load_colon_data():
result = _load_colon_data() # only load data not labels
assert result is not None
assert isinstance(result, pd.DataFrame)
assert result.shape == (62, 2000)


@pytest.mark.flaky(reruns=3, reruns_delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=30)
def test_load_colon_label():
result = _load_colon_label() # only load labels not data
assert result is not None
assert isinstance(result, pd.Series)
assert len(result) == 62


@pytest.mark.flaky(reruns=3, reruns_delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=30)
def test_load_colon(tmpdir):
result = load_colon(tmpdir)
assert result is not None
Expand All @@ -39,7 +39,7 @@ def test_load_colon(tmpdir):
assert result[1].shape == (62, 2000)


@pytest.mark.flaky(reruns=3, reruns_delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=30)
def test_load_colon_compare_original(tmpdir):
result = load_colon(tmpdir)
ori_result = load_colon_data()
Expand All @@ -49,7 +49,7 @@ def test_load_colon_compare_original(tmpdir):
assert_almost_equal(result[1].to_numpy(), ori_result[1].to_numpy())


@pytest.mark.flaky(reruns=3, reruns_delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=30)
def test_load_prostate(tmpdir):
result = load_prostate(tmpdir)
assert result is not None
Expand All @@ -61,7 +61,7 @@ def test_load_prostate(tmpdir):
assert result[1].shape == (102, 6033)


@pytest.mark.flaky(reruns=3, reruns_delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=30)
def test_load_prostate_compare_original(tmpdir):
result = load_prostate(tmpdir)
ori_result = load_prostate_data()
Expand All @@ -71,7 +71,7 @@ def test_load_prostate_compare_original(tmpdir):
assert_almost_equal(result[1].to_numpy(), ori_result[1].to_numpy())


@pytest.mark.flaky(reruns=3, reruns_delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=30)
def test_load_leukemia_big(tmpdir):
result = load_leukemia_big(tmpdir)
assert result is not None
Expand All @@ -83,7 +83,7 @@ def test_load_leukemia_big(tmpdir):
assert result[1].shape == (72, 7128)


@pytest.mark.flaky(reruns=3, reruns_delay=5)
@pytest.mark.flaky(reruns=5, reruns_delay=30)
def test_load_leukemia_big_compare_original(tmpdir):
result = load_leukemia_big(tmpdir)
ori_result = load_leukemia_data()
Expand Down

0 comments on commit 2f1859c

Please sign in to comment.