Skip to content

Commit

Permalink
Move pytest config to pyproject + configure filterwarnings
Browse files Browse the repository at this point in the history
  • Loading branch information
t20100 committed Apr 19, 2024
1 parent 2d45d66 commit cd3944a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,18 @@ build-backend = "setuptools.build_meta"
required-version = 23
target-version = ["py37", "py38", "py39", "py310", "py311", "py312"]
safe = true

[tool.pytest.ini_options]
minversion = "6.0"
python_files = [
"test/test*.py",
"test/Test*.py",
]
python_classes = "Test"
python_functions = "test"
filterwarnings = [
"error",
# note the use of single quote below to denote "raw" strings in TOML
'ignore:tostring\(\) is deprecated. Use tobytes\(\) instead\.:DeprecationWarning:OpenGL',
'ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning',
]
6 changes: 0 additions & 6 deletions pytest.ini

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def get_project_configuration():
"Pillow",
]

test_requires = ["pytest", "pytest-xvfb", "pytest-mock", "bitshuffle"]
test_requires = ["pytest>=6.0", "pytest-xvfb", "pytest-mock", "bitshuffle"]

doc_requires = {
"nbsphinx",
Expand Down

0 comments on commit cd3944a

Please sign in to comment.