Skip to content

Commit

Permalink
adopt to not test tests which import matplotlib
Browse files Browse the repository at this point in the history
  • Loading branch information
relleums committed Sep 18, 2023
1 parent fb2b074 commit 7a0145c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
python -m pip install .
- name: Test with pytest
run: |
pytest .
pytest . -k 'not import_matplotlib'
4 changes: 3 additions & 1 deletion spectral_energy_distribution_units/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
def pytest_configure(config):
config.addinivalue_line("markers", "nottravis: Travis does not test this.")
config.addinivalue_line(
"markers", "import_matplotlib: For when matplotlib is involved."
)
2 changes: 1 addition & 1 deletion spectral_energy_distribution_units/tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
}


@pytest.mark.nottravis
@pytest.mark.import_matplotlib
def test_plot_styles():
import matplotlib

Expand Down
2 changes: 1 addition & 1 deletion spectral_energy_distribution_units/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.4"
__version__ = "0.0.5"

0 comments on commit 7a0145c

Please sign in to comment.