Lines Matching defs:function
273 # function
401 self.assertEqual(record.function, 'eggs')
707 # Test inspect.getsource with a one-line lambda function.
711 # Test inspect.getsource with a three-line lambda function,
716 # Test inspect.getsource with a two-line lambda function,
721 # Test inspect.getsource with a regular one-line function.
725 # Test inspect.getsource with a regular function where
731 # Test inspect.getsource with a regular function where
737 # Test inspect.getsource with a one-line lambda function
742 # Test inspect.getsource with a lambda function defined
743 # as argument to another function.
1343 self.assertEqual(inspect.get_annotations(isa.function), {'a': int, 'b': str, 'return': isa.MyClass})
1352 self.assertEqual(inspect.get_annotations(isa.function, eval_str=True), {'a': int, 'b': str, 'return': isa.MyClass})
1361 self.assertEqual(inspect.get_annotations(isa.function, eval_str=False), {'a': int, 'b': str, 'return': isa.MyClass})
1374 wrapped = times_three(isa.function)
1376 self.assertIsNot(wrapped.__globals__, isa.function.__globals__)
1385 self.assertEqual(inspect.get_annotations(isa.function), {'a': 'int', 'b': 'str', 'return': 'MyClass'})
1393 self.assertEqual(inspect.get_annotations(isa.function, eval_str=True), {'a': int, 'b': str, 'return': isa.MyClass})
1401 self.assertEqual(inspect.get_annotations(isa.function, eval_str=False), {'a': 'int', 'b': 'str', 'return': 'MyClass'})
1418 wrapped = times_three(isa.function)
1420 self.assertIsNot(wrapped.__globals__, isa.function.__globals__)
1478 def function():
1487 self.assertFalse(inspect.isdatadescriptor(function),
1488 'a function is not a data descriptor')
1645 """Create a function that returns its locals()"""
2651 # If object is not a duck type of function, then
2677 # We only want to duck type function-like objects,
3576 signature_func(isa.function),
3618 signature_func(isa.function, eval_str=True),
3646 signature_func(isa.function, eval_str=True, globals=globalns)
3649 signature_func(isa.function, eval_str=True, locals=localns),
3658 signature_func(isa.function, eval_str=True, globals=globalns, locals=localns),