Skip to content

Commit

Permalink
Remove unused imports and add stacklevel to warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jiwaszki committed Jul 14, 2024
1 parent 0dfebe1 commit d754b47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_warning_register():
assert issubclass(m.CustomWarning, DeprecationWarning)

with pytest.warns(m.CustomWarning) as excinfo:
warnings.warn("This is warning from Python!", m.CustomWarning)
warnings.warn("This is warning from Python!", m.CustomWarning, stacklevel=1)

assert issubclass(excinfo[0].category, DeprecationWarning)
assert issubclass(excinfo[0].category, m.CustomWarning)
Expand Down

0 comments on commit d754b47

Please sign in to comment.