Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suppress warnings even in the imports
Some warnings were raised by `@asyncio.coroutine` decorators (e.g. in `asynctest` since Python 3.9.0), which are executed in class definition, which happens in the importing stage before pytest hooks are executed. By putting the warnings config to the INI file, we shift it to before the imports of any modules.
- Loading branch information
Showing
2 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[pytest] | ||
# Unexpected warnings should fail the tests. Use `-W ignore` to explicitly disable it. | ||
# Warnings from the testing tools out of our control should not fail the tests. | ||
filterwarnings = | ||
error | ||
ignore:"@coroutine":DeprecationWarning:asynctest | ||
ignore:The loop argument:DeprecationWarning:aiohttp | ||
ignore:The loop argument:DeprecationWarning:aiojobs | ||
ignore:The loop argument:DeprecationWarning:asyncio.queues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters