def test_typechecked_no_annotations(self, recwarn): def foo(a, b): pass typechecked(foo) func_name = function_name(foo) assert len(recwarn) == 1 assert str(recwarn[0].message) == ( 'no type annotations present -- not typechecking {}'.format(func_name))
def test_function_name(): assert function_name(function_name) == 'typeguard.function_name'