Skip to content

Commit

Permalink
Merge pull request #59 from Ericgig/bug.weekly
Browse files Browse the repository at this point in the history
Update warnings filter for pytest
  • Loading branch information
Ericgig authored Jul 2, 2024
2 parents 684da39 + caad274 commit 6443cdf
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
# to see if something hung.
timeout-minutes: 60
run: |
pytest --durations=0 --durations-min=1.0 --verbosity=1 --cov=qutip_jax --cov-report= --color=yes -W ignore::UserWarning:qutip -W "ignore:Complex dtype:UserWarning"
pytest --durations=0 --durations-min=1.0 --verbosity=1 --color=yes --cov=qutip_jax --cov-report=
# Above flags are:
# --durations=0 --durations-min=1.0
# at the end, show a list of all the tests that took longer than a
Expand All @@ -73,8 +73,6 @@ jobs:
# --cov-report=
# don't print the coverage report to the terminal---it just adds
# cruft, and we're going to upload the .coverage file to Coveralls
# -W ignore::UserWarning:qutip
# Ignore matplotlib missing warnings
# These flags are added to those in pyproject.toml.
- name: Upload to Coveralls
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,16 @@ jobs:
# to see if something hung.
timeout-minutes: 60
run: |
pytest --durations=0 --durations-min=1.0 --verbosity=1 --color=yes -W ignore::UserWarning:qutip -W "ignore:Complex dtype:UserWarning"
pytest -Werror --durations=0 --durations-min=1.0 --verbosity=1 --color=yes
# Above flags are:
# --durations=0 --durations-min=1.0
# at the end, show a list of all the tests that took longer than a
# second to run
# --verbosity=1
# turn the verbosity up so pytest prints the names of the tests
# it's currently working on
# --cov=qutip_jax
# limit coverage reporting to code that's within the qutip_jax package
# --color=yes
# force coloured output in the terminal
# -W ignore::UserWarning:qutip
# Ignore matplotlib missing warnings
# These flags are added to those in pyproject.toml.
finalise:
Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
readthedocs-sphinx-search==0.3.2
numpydoc==1.4.0
matplotlib==3.7.1
matplotlib>=3.9.0
docutils==0.18.1
jax
jax[cpu]
Expand Down
6 changes: 0 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@ requires = [
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
addopts = "-Werror --strict-config --strict-markers -W \"ignore:Complex dtype:UserWarning\""
testpaths = [
"tests",
]
12 changes: 12 additions & 0 deletions tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[pytest]
addopts = --strict-config --strict-markers
filterwarnings =
error
; Ignore matplotlib missing warnings
ignore:matplotlib not found:UserWarning
; Ignore diffrax's partial complex support
ignore:Complex dtype:UserWarning
; Diffrax / equinox are have warning with latest jax
ignore:jax.core.pp_eqn_rules is deprecated.:DeprecationWarning
ignore:unhashable type:FutureWarning
ignore:In a future release of JAX,:DeprecationWarning

0 comments on commit 6443cdf

Please sign in to comment.