コード例 #1
0
ファイル: test_typeguard.py プロジェクト: niosHD/typeguard
    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))
コード例 #2
0
ファイル: test_typeguard.py プロジェクト: kstauffer/typeguard
def test_function_name():
    assert function_name(function_name) == 'typeguard.function_name'