'Ensure deprecated_call() raises the expected failure when its block/function does
not raise a deprecation warning.'

@pytest.mark.parametrize('mode', ['context_manager', 'call'])
def test_deprecated_call_no_warning(self, mode):

    def f():
        pass
    msg = 'Did    not    produce    DeprecationWarning    or    PendingDeprecationWarning'
    with pytest.raises(AssertionError, matches=msg):
        if (mode == 'call'):
            pytest.deprecated_call(f)
        else:
            with pytest.deprecated_call():
                f()
