Searched refs:lookup_by_name (Results 1 – 2 of 2) sorted by relevance
376 def lookup_by_name(cls, name): member in _EnumClass436 return cls.lookup_by_name(index)
121 self.assertEquals(Color.RED, Color.lookup_by_name('RED'))122 self.assertRaises(KeyError, Color.lookup_by_name, 20)123 self.assertRaises(KeyError, Color.lookup_by_name, Color.RED)