diff --git a/tests/conftest.py b/tests/conftest.py index 6050ebb3..f08ca428 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -26,10 +26,13 @@ def remove_data_folder(): request.addfinalizer(remove_data_folder) -@pytest.mark.requires_netcdf @pytest.fixture(scope="session") -def samplecat(): +def samplecat(request): """Generate a sample catalog with the tutorial netCDFs.""" + mark_skip = request.config.getoption("-m") + if "not requires_netcdf" == mark_skip: + pytest.skip("Skipping tests that require netCDF files") + df = xs.parse_directory( directories=[SAMPLES_DIR], patterns=[