Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop deprecated pytest.warns(None) #2235

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/unit/test_ticketed_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
from functools import partial
from io import StringIO
import warnings

import pytest

Expand Down Expand Up @@ -615,9 +616,9 @@ def test_isort_should_warn_on_empty_custom_config_issue_1433(tmpdir):
quiet = true
"""
)
with pytest.warns(None) as warning: # type: ignore
with warnings.catch_warnings():
warnings.simplefilter("error")
assert Config(settings_file=str(settings_file)).quiet
assert not warning


def test_float_to_top_should_respect_existing_newlines_between_imports_issue_1502():
Expand Down