diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..51d76c8 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,6 @@ +[pytest] +markers = + slow: marks tests as slow (deselect with '-m "not slow"') + +pythonpath = . +testpaths = tests diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/chimp/__init__.py b/tests/chimp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/cmaps/__init__.py b/tests/cmaps/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/conftest.py b/tests/conftest.py index 1327c7f..f52f291 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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 \ No newline at end of file + 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") \ No newline at end of file diff --git a/tests/gamera/__init__.py b/tests/gamera/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/rcm/__init__.py b/tests/rcm/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/remix/__init__.py b/tests/remix/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/satcomp/__init__.py b/tests/satcomp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/satcomp/test_satcomp_cdasws.py b/tests/satcomp/test_satcomp_cdasws.py index 4f85e67..95b9666 100644 --- a/tests/satcomp/test_satcomp_cdasws.py +++ b/tests/satcomp/test_satcomp_cdasws.py @@ -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):