function: test.deprecated_call

*Not documented*
def deprecated_call(func, *args, **kwargs):

origin:<UNKNOWN>

where:

exceptions that might appear during execution:

function source:

def deprecated_call(func, *args, **kwargs):
    l = []
    oldwarn = py.std.warnings.warn_explicit
    def warn_explicit(*args, **kwargs): 
        l.append(args) 
        oldwarn(*args, **kwargs)
        
    py.magic.patch(py.std.warnings, 'warn_explicit', warn_explicit)
    try:
        _ = func(*args, **kwargs)
    finally:
        py.magic.revert(py.std.warnings, 'warn_explicit')
    assert l

call sites:

called in None</home/johnny/projects/merlinux/py/dist/py/test/raises.py:20>

traceback test.deprecated_call.0

called in None</home/johnny/projects/merlinux/py/dist/py/test/raises.py:20>

traceback test.deprecated_call.1

called in /home/johnny/projects/merlinux/py/dist/py/path/testing/common.py

traceback test.deprecated_call.2

called in /home/johnny/projects/merlinux/py/dist/py/test/testing/test_deprecated.py

traceback test.deprecated_call.3

called in /home/johnny/projects/merlinux/py/dist/py/test/testing/test_deprecated.py

traceback test.deprecated_call.4

called in /home/johnny/projects/merlinux/py/dist/py/test/testing/test_deprecated.py

traceback test.deprecated_call.5

called in None</home/johnny/projects/merlinux/py/dist/py/test/raises.py:20>

traceback test.deprecated_call.6

called in /home/johnny/projects/merlinux/py/dist/py/test/testing/test_deprecated.py

traceback test.deprecated_call.7

called in /home/johnny/projects/merlinux/py/dist/py/path/testing/test_api.py

traceback test.deprecated_call.8