Skip to content

Commit

Permalink
Treat all warnings as errors during tests
Browse files Browse the repository at this point in the history
This helps catching incorrect/deprecated API usage of third-party
libraries and also potentials ressources not properly disposed during
tests (for example, Pytest reports a warking internally if a file object
wasn't closed).
  • Loading branch information
Delgan committed Jan 10, 2024
1 parent 7f9e2a7 commit e5b2cbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ strict = true
[tool.pytest.ini_options]
addopts = "-l"
filterwarnings = [
# By default all warnings are treated as errors.
'error',
# Mixing threads and "fork()" is deprecated, but we need to test it anyway.
'ignore:.*use of fork\(\) may lead to deadlocks in the child.*:DeprecationWarning',
# The "dateutil" package used by "freezegun" relies on some deprecated APIs.
Expand Down

0 comments on commit e5b2cbd

Please sign in to comment.