Skip to content

Commit b6780b1

Browse files
authored
Merge pull request #137 from ACCESS-NRI/136-repro-test-markers
Add test-specific repro test markers
2 parents 32612ab + 0e96a1e commit b6780b1

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

src/model_config_tests/conftest.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,18 @@ def pytest_addoption(parser):
116116

117117
def pytest_configure(config):
118118
config.addinivalue_line(
119-
"markers", "checksum: mark tests to run as part of reproducibility CI tests"
119+
"markers", "repro: mark tests to run as part of reproducibility tests"
120120
)
121121
config.addinivalue_line(
122-
"markers", "checksum_slow: mark tests as slow reproducibility tests"
122+
"markers", "repro_historical: mark tests that check historical reproducibility"
123123
)
124+
config.addinivalue_line(
125+
"markers", "repro_repeat: mark tests that check repeat reproducibility"
126+
)
127+
config.addinivalue_line(
128+
"markers", "repro_restart: mark tests that check restart reproducibility"
129+
)
130+
config.addinivalue_line("markers", "slow: mark tests that are slow to run")
124131
config.addinivalue_line(
125132
"markers",
126133
"config: mark as configuration tests for release branches in quick QA CI checks",

src/model_config_tests/test_bit_reproducibility.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ def read_historical_checksums(
4747

4848
class TestBitReproducibility:
4949

50-
@pytest.mark.checksum
50+
@pytest.mark.repro
51+
@pytest.mark.repro_historical
5152
def test_bit_repro_historical(
5253
self,
5354
output_path: Path,
@@ -132,7 +133,9 @@ def test_bit_repro_historical(
132133
hist_checksums == checksums
133134
), f"Checksums were not equal. The new checksums have been written to {checksum_output_file}."
134135

135-
@pytest.mark.checksum_slow
136+
@pytest.mark.repro
137+
@pytest.mark.repro_repeat
138+
@pytest.mark.slow
136139
def test_bit_repro_repeat(self, output_path: Path, control_path: Path):
137140
"""
138141
Test that a run has same checksums when ran twice
@@ -154,7 +157,9 @@ def test_bit_repro_repeat(self, output_path: Path, control_path: Path):
154157

155158
assert produced == expected
156159

157-
@pytest.mark.checksum_slow
160+
@pytest.mark.repro
161+
@pytest.mark.repro_restart
162+
@pytest.mark.slow
158163
def test_restart_repro(self, output_path: Path, control_path: Path):
159164
"""
160165
Test that a run reproduces across restarts.

0 commit comments

Comments
 (0)