Exemplo n.º 1
0
 def test_DefinedFunctions_None(self):
     target = SourceCode(self.none_ast)
     functions = target.DefinedFunctions()
     self.assertEqual(functions, [])
Exemplo n.º 2
0
 def test_DefinedFunctions_valid(self):
     target = SourceCode(self.valid_ast)
     functions = target.DefinedFunctions()
     self.assertEqual(len(functions), 2)
     example = functions[0]
     self.assertEqual(example.name, 'g_function_def1')