diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db1c2004..63bcf50b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,7 +93,8 @@ jobs: - name: Run the tests run: >- - pytest -ra --cov --cov-report=xml --cov-report=term --durations=20 + pytest -m "not earthdata and not issue" -ra --cov --cov-report=xml + --cov-report=term --durations=20 - name: Upload coverage report uses: codecov/codecov-action@v3.1.4 diff --git a/noxfile.py b/noxfile.py index 46f2e263..6091473d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -45,20 +45,12 @@ def tests(session: nox.Session) -> None: session.conda_install("pygmt", "geopandas") session.install(".[test]") - # run tests with numba jit disabled to get real coverage - session.run( - "pytest", - *session.posargs, - env={"NUMBA_DISABLE_JIT": "1"}, - ) - - # run just the numba tests with numba jit enabled + # run the tests session.run( "pytest", "-m", - "use_numba", + "not earthdata and not issue", *session.posargs, - env={"NUMBA_DISABLE_JIT": "0"}, ) diff --git a/pyproject.toml b/pyproject.toml index b67008c2..ebf7c273 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -131,7 +131,6 @@ markers = [ "slow: marks tests as slow (deselect with '-m \"not slow\"')", "earthdata: marks tests as requiring earthdata login info (deselect with '-m \"not earthdata\"')", "issue: mark tests with current issues (deselect with '-m \"not issues\"')", - "working: marks tests which are working", "fetch: marks tests which fetch data", ] diff --git a/tests/test_fetch.py b/tests/test_fetch.py index f862df46..8a75d3e1 100644 --- a/tests/test_fetch.py +++ b/tests/test_fetch.py @@ -187,7 +187,7 @@ def test_(): ] -@pytest.mark.working() +@pytest.mark.fetch() @pytest.mark.parametrize(("test_input", "expected"), resample_test) @pytest.mark.filterwarnings("ignore::RuntimeWarning") def test_resample_grid(test_input, expected): @@ -321,7 +321,6 @@ def test_imagery(): @pytest.mark.fetch() -@pytest.mark.working() @pytest.mark.filterwarnings("ignore::RuntimeWarning") def test_basement(): grid = fetch.basement() @@ -516,6 +515,7 @@ def test_ibcso_coverage(): @pytest.mark.fetch() +@pytest.mark.issue() @pytest.mark.filterwarnings("ignore::RuntimeWarning") @pytest.mark.parametrize(("test_input", "expected"), ibcso_test) def test_ibcso(test_input, expected): @@ -804,7 +804,6 @@ def test_bedmap_points(): # @pytest.mark.fetch() -# @pytest.mark.working() # @pytest.mark.slow() # @pytest.mark.filterwarnings("ignore::RuntimeWarning") # def test_deepbedmap(): @@ -866,7 +865,6 @@ def test_bedmap_points(): @pytest.mark.fetch() -@pytest.mark.working() @pytest.mark.filterwarnings("ignore::RuntimeWarning") @pytest.mark.parametrize(("test_input", "expected"), gravity_test) def test_gravity(test_input, expected): @@ -978,7 +976,6 @@ def test_rosetta_gravity(): @pytest.mark.fetch() -@pytest.mark.working() @pytest.mark.filterwarnings("ignore::RuntimeWarning") @pytest.mark.parametrize(("test_input", "expected"), magnetics_test) def test_magnetics(test_input, expected): @@ -1112,7 +1109,6 @@ def test_basal_melt(test_input, expected): @pytest.mark.fetch() -@pytest.mark.working() @pytest.mark.filterwarnings("ignore::RuntimeWarning") @pytest.mark.parametrize(("test_input", "expected"), ghf_test) def test_ghf(test_input, expected): @@ -1127,7 +1123,6 @@ def test_ghf(test_input, expected): @pytest.mark.fetch() -@pytest.mark.working() def test_ghf_points(): df = fetch.ghf(version="burton-johnson-2020", points=True) expected = [ @@ -1217,7 +1212,6 @@ def test_gia(test_input, expected): @pytest.mark.fetch() -@pytest.mark.working() @pytest.mark.filterwarnings("ignore::RuntimeWarning") @pytest.mark.parametrize(("test_input", "expected"), crust_test) def test_crustal_thickness(test_input, expected): @@ -1261,7 +1255,6 @@ def test_crustal_thickness(test_input, expected): @pytest.mark.fetch() -@pytest.mark.working() @pytest.mark.filterwarnings("ignore::RuntimeWarning") @pytest.mark.parametrize(("test_input", "expected"), moho_test) def test_moho(test_input, expected):