Skip to content

Commit

Permalink
exclude slow tests by default, keep them in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
eroell committed Dec 3, 2024
1 parent db99377 commit bd42b73
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
MPLBACKEND: agg
PLATFORM: ${{ matrix.os }}
DISPLAY: :42
run: coverage run -m pytest -v --color=yes
run: coverage run -m pytest "" -v --color=yes
- name: Report coverage
run: coverage report
- name: Upload coverage
Expand Down
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
addopts = -m "not slow"
4 changes: 4 additions & 0 deletions tests/test_dt/test_dt.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def duckdb_connection():
con.close()


@pytest.mark.slow
def test_mimic_iv_omop(tmp_path):
duckdb_connection = duckdb.connect()
ed.dt.mimic_iv_omop(data_path=tmp_path, backend_handle=duckdb_connection)
Expand All @@ -22,6 +23,7 @@ def test_mimic_iv_omop(tmp_path):
duckdb_connection.close()


@pytest.mark.slow
def test_gibleed_omop(tmp_path):
duckdb_connection = duckdb.connect()
ed.dt.gibleed_omop(data_path=tmp_path, backend_handle=duckdb_connection)
Expand All @@ -31,6 +33,7 @@ def test_gibleed_omop(tmp_path):
duckdb_connection.close()


@pytest.mark.slow
def test_synthea27nj_omop(tmp_path):
duckdb_connection = duckdb.connect()
ed.dt.synthea27nj_omop(data_path=tmp_path, backend_handle=duckdb_connection)
Expand All @@ -40,6 +43,7 @@ def test_synthea27nj_omop(tmp_path):
duckdb_connection.close()


@pytest.mark.slow
def test_physionet2012():
edata = ed.dt.physionet2012()
assert edata.shape == (11988, 38)
Expand Down

0 comments on commit bd42b73

Please sign in to comment.