コード例 #1
0
ファイル: test_classtools.py プロジェクト: CJStuart/amcat
    def test_get_caller(self):
        fn, line, func = classtools.get_caller(depth=0)
        self.assertEqual(fn, __file__.replace(".pyc", ".py"))
        self.assertEqual(func, "test_get_caller")

        def _test():
            return classtools.get_caller()

        fn, line, func = _test()
        self.assertEqual(fn, __file__.replace(".pyc", ".py"))
        self.assertEqual(func, "test_get_caller")
コード例 #2
0
    def test_get_caller(self):
        fn, line, func = classtools.get_caller(depth=0)
        self.assertEqual(fn, __file__.replace(".pyc", ".py"))
        self.assertEqual(func, "test_get_caller")

        def _test():
            return classtools.get_caller()

        fn, line, func = _test()
        self.assertEqual(fn, __file__.replace(".pyc", ".py"))
        self.assertEqual(func, "test_get_caller")
コード例 #3
0
ファイル: test_classtools.py プロジェクト: CJStuart/amcat
 def _test():
     return classtools.get_caller()
コード例 #4
0
 def _test():
     return classtools.get_caller()