def assertMatches(self, expected_type, arg_types, functions):
     match = pt.best_match(arg_types, functions)
     if expected_type is not None:
         self.assertNotEqual(None, match)
     self.assertEqual(expected_type, match.type)
예제 #2
0
 def assertMatches(self, expected_type, arg_types, functions):
     match = pt.best_match(arg_types, functions)
     if expected_type is not None:
         self.assertNotEqual(None, match)
     self.assertEqual(expected_type, match.type)
예제 #3
0
 def assertMatches(self, expected_type, arg_types, functions):
     args = [ NameNode(None, type=arg_type) for arg_type in arg_types ]
     match = pt.best_match(args, functions)
     if expected_type is not None:
         self.assertNotEqual(None, match)
     self.assertEqual(expected_type, match.type)