mirror of
https://github.com/JHUAPL/kaipy.git
synced 2026-01-08 15:33:56 -05:00
Adds option for slow tests, e.g. satcomp, not to run
This commit is contained in:
6
pytest.ini
Normal file
6
pytest.ini
Normal 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
0
tests/__init__.py
Normal file
0
tests/chimp/__init__.py
Normal file
0
tests/chimp/__init__.py
Normal file
0
tests/cmaps/__init__.py
Normal file
0
tests/cmaps/__init__.py
Normal file
@@ -92,4 +92,13 @@ def mix_file(tmpdir):
|
|||||||
ftag = "test"
|
ftag = "test"
|
||||||
file_path = fdir.join("test.mix.h5")
|
file_path = fdir.join("test.mix.h5")
|
||||||
file_path = write_mix_h5(file_path)
|
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
0
tests/gamera/__init__.py
Normal file
0
tests/rcm/__init__.py
Normal file
0
tests/rcm/__init__.py
Normal file
0
tests/remix/__init__.py
Normal file
0
tests/remix/__init__.py
Normal file
0
tests/satcomp/__init__.py
Normal file
0
tests/satcomp/__init__.py
Normal file
@@ -21,7 +21,7 @@ def test_emphem(key):
|
|||||||
assert 'CoordSys' in scIdDict[key]['Ephem'], \
|
assert 'CoordSys' in scIdDict[key]['Ephem'], \
|
||||||
'{} lacks Ephem CoordSys key'.format(key)
|
'{} lacks Ephem CoordSys key'.format(key)
|
||||||
|
|
||||||
|
@pytest.mark.slow
|
||||||
@pytest.mark.parametrize("key",[key for key in scutils.getScIds().keys()])
|
@pytest.mark.parametrize("key",[key for key in scutils.getScIds().keys()])
|
||||||
def test_pullVar(key):
|
def test_pullVar(key):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user