Correct test_deprecated_call_preserves test.
Test if we preserve the correct functions.
This commit is contained in:
parent
89b00d714f
commit
444cdfe6e3
|
@ -64,12 +64,12 @@ def test_deprecated_call_ret():
|
||||||
assert ret == 42
|
assert ret == 42
|
||||||
|
|
||||||
def test_deprecated_call_preserves():
|
def test_deprecated_call_preserves():
|
||||||
r = py.std.warnings.onceregistry.copy()
|
warn = py.std.warnings.warn
|
||||||
f = py.std.warnings.filters[:]
|
warn_explicit = py.std.warnings.warn_explicit
|
||||||
test_deprecated_call_raises()
|
test_deprecated_call_raises()
|
||||||
test_deprecated_call()
|
test_deprecated_call()
|
||||||
assert r == py.std.warnings.onceregistry
|
assert warn == py.std.warnings.warn
|
||||||
assert f == py.std.warnings.filters
|
assert warn_explicit == py.std.warnings.warn_explicit
|
||||||
|
|
||||||
def test_deprecated_explicit_call_raises():
|
def test_deprecated_explicit_call_raises():
|
||||||
pytest.raises(AssertionError,
|
pytest.raises(AssertionError,
|
||||||
|
|
Loading…
Reference in New Issue