update test_recwarn to new style
This commit is contained in:
parent
eabf2f9091
commit
5ccb7b1ced
|
@ -112,12 +112,12 @@ class TestDeprecatedCall(object):
|
||||||
def test_deprecated_call_as_context_manager_no_warning(self):
|
def test_deprecated_call_as_context_manager_no_warning(self):
|
||||||
with pytest.raises(pytest.fail.Exception) as ex:
|
with pytest.raises(pytest.fail.Exception) as ex:
|
||||||
with pytest.deprecated_call():
|
with pytest.deprecated_call():
|
||||||
dep(1)
|
self.dep(1)
|
||||||
assert str(ex.value) == "DID NOT WARN"
|
assert str(ex.value) == "DID NOT WARN"
|
||||||
|
|
||||||
def test_deprecated_call_as_context_manager(self):
|
def test_deprecated_call_as_context_manager(self):
|
||||||
with pytest.deprecated_call():
|
with pytest.deprecated_call():
|
||||||
dep(0)
|
self.dep(0)
|
||||||
|
|
||||||
def test_deprecated_call_pending(self):
|
def test_deprecated_call_pending(self):
|
||||||
def f():
|
def f():
|
||||||
|
|
Loading…
Reference in New Issue