Adds option for slow tests, e.g. satcomp, not to run

This commit is contained in:
wiltbemj
2025-04-25 14:46:57 -06:00
parent 4783483f22
commit a301a05586
10 changed files with 17 additions and 2 deletions

6
pytest.ini Normal file
View File

@@ -0,0 +1,6 @@
[pytest]
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
pythonpath = .
testpaths = tests

0
tests/__init__.py Normal file
View File

0
tests/chimp/__init__.py Normal file
View File

0
tests/cmaps/__init__.py Normal file
View File

View File

@@ -92,4 +92,13 @@ def mix_file(tmpdir):
ftag = "test"
file_path = fdir.join("test.mix.h5")
file_path = write_mix_h5(file_path)
return file_path
return file_path
def pytest_addoption(parser):
parser.addoption(
"--runslow", action="store_true", default=False, help="run tests marked as slow"
)
def pytest_runtest_setup(item):
if "slow" in item.keywords and not item.config.getoption("--runslow"):
pytest.skip("need --runslow option to run")

0
tests/gamera/__init__.py Normal file
View File

0
tests/rcm/__init__.py Normal file
View File

0
tests/remix/__init__.py Normal file
View File

View File

View File

@@ -21,7 +21,7 @@ def test_emphem(key):
assert 'CoordSys' in scIdDict[key]['Ephem'], \
'{} lacks Ephem CoordSys key'.format(key)
@pytest.mark.slow
@pytest.mark.parametrize("key",[key for key in scutils.getScIds().keys()])
def test_pullVar(key):