diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2023-05-11 06:13:17 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-05-11 06:13:17 -0400 |
commit | ee17e7cdf5cae88b8807970581a995469e37e034 (patch) | |
tree | aa206ff259bc35222a4a0d755e71fde78d2784dd /tests | |
parent | f2a9648bb14b5cbb56274ca3a20a6024d117efd1 (diff) | |
download | python-coveragepy-git-ee17e7cdf5cae88b8807970581a995469e37e034.tar.gz |
test: try to silence a new warning
For example:
```
.tox/anypy/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:1004: 50 warnings
/Users/nedbatchelder/coverage/trunk/.tox/anypy/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:1004: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
expl_format = self.pop_format_context(ast.Str(expl))
```
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conftest.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 41db85b4..6d3ec318 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -40,7 +40,7 @@ def set_warnings() -> None: warnings.simplefilter("once", DeprecationWarning) # Warnings to suppress: - # How come these warnings are successfully suppressed here, but not in setup.cfg?? + # How come these warnings are successfully suppressed here, but not in pyproject.toml?? warnings.filterwarnings( "ignore", @@ -54,6 +54,13 @@ def set_warnings() -> None: message=r"module 'sre_constants' is deprecated", ) + # From _pytest/assertion/rewrite.py + warnings.filterwarnings( + "ignore", + category=DeprecationWarning, + message=r"is deprecated and will be removed in Python 3.14; use ast.Constant instead", + ) + warnings.filterwarnings( "ignore", category=pytest.PytestRemovedIn8Warning, |