Skip to content

Commit

Permalink
Use pytest filterwarnings (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlittle authored Oct 2, 2023
1 parent 68d4bdf commit 3b195bb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,25 @@ skip = ".git,*.ipynb"


[tool.pytest.ini_options]
addopts = "-ra -v --doctest-modules --doctest-continue-on-failure --import-mode=importlib --strict-markers"
addopts = [
"--doctest-continue-on-failure",
"--doctest-modules",
"--import-mode=importlib",
"-ra",
"--strict-markers",
"-v",
]
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS NUMBER"
filterwarnings = [
"error",
"ignore:numpy.ndarray size changed:RuntimeWarning",
]
image_cache_dir = "tests/plotting/image_cache"
markers = [
"image: plotter rendering image test",
]
minversion = "6.0"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS NUMBER"
testpaths = "tests"
image_cache_dir = "tests/plotting/image_cache"


[tool.ruff]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ usedevelop =
true
commands =
mkdir --parents {toxinidir}/test_images
pytest {posargs} --fail_extra_image_cache --generated_image_dir {toxinidir}{/}test_images -W error -W "ignore:numpy.ndarray size changed:RuntimeWarning"
pytest {posargs} --fail_extra_image_cache --generated_image_dir {toxinidir}{/}test_images
{env:POST_COMMAND:}


Expand Down

0 comments on commit 3b195bb

Please sign in to comment.