Correct test_deprecated_call_preserves test.

Test if we preserve the correct functions.
This commit is contained in:
Pieter Mulder 2015-06-25 17:33:40 +02:00
parent 89b00d714f
commit 444cdfe6e3
1 changed files with 4 additions and 4 deletions

View File

@ -64,12 +64,12 @@ def test_deprecated_call_ret():
assert ret == 42
def test_deprecated_call_preserves():
r = py.std.warnings.onceregistry.copy()
f = py.std.warnings.filters[:]
warn = py.std.warnings.warn
warn_explicit = py.std.warnings.warn_explicit
test_deprecated_call_raises()
test_deprecated_call()
assert r == py.std.warnings.onceregistry
assert f == py.std.warnings.filters
assert warn == py.std.warnings.warn
assert warn_explicit == py.std.warnings.warn_explicit
def test_deprecated_explicit_call_raises():
pytest.raises(AssertionError,