Skip to content

Commit

Permalink
Append/update builtins deprecations warnings instead of prepend (#39089)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taragolis committed Apr 17, 2024
1 parent ebd65ce commit 5db76b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/_internals/capture_warnings.py
Expand Up @@ -127,8 +127,8 @@ def __init__(self, config: pytest.Config, output_path: str | None = None):
def pytest_runtest_call(self, item: pytest.Item):
with warnings.catch_warnings(record=True) as records:
if not sys.warnoptions:
warnings.filterwarnings("always", category=DeprecationWarning)
warnings.filterwarnings("always", category=PendingDeprecationWarning)
warnings.filterwarnings("always", category=DeprecationWarning, append=True)
warnings.filterwarnings("always", category=PendingDeprecationWarning, append=True)
yield

for record in records:
Expand Down

0 comments on commit 5db76b9

Please sign in to comment.