From 444cdfe6e3ba1fb5788da9bb6778cfec76970be4 Mon Sep 17 00:00:00 2001 From: Pieter Mulder Date: Thu, 25 Jun 2015 17:33:40 +0200 Subject: [PATCH] Correct test_deprecated_call_preserves test. Test if we preserve the correct functions. --- testing/test_recwarn.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/test_recwarn.py b/testing/test_recwarn.py index d8fe1784e..d3455946f 100644 --- a/testing/test_recwarn.py +++ b/testing/test_recwarn.py @@ -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,