MCPcopy Index your code
hub / github.com/python/cpython / test_aliases

Method test_aliases

Lib/test/test_enum.py:4464–4472  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4462 self.assertEqual(self.Color.__len__(self.Color.BLANCO), 3)
4463
4464 def test_aliases(self):
4465 Color = self.Color
4466 self.assertEqual(Color(1).name, 'RED')
4467 self.assertEqual(Color['ROJO'].name, 'RED')
4468 self.assertEqual(Color(7).name, 'WHITE')
4469 self.assertEqual(Color['BLANCO'].name, 'WHITE')
4470 self.assertIs(Color.BLANCO, Color.WHITE)
4471 Open = self.Open
4472 self.assertIs(Open['AC'], Open.AC)
4473
4474 def test_bool(self):
4475 Perm = self.Perm

Callers

nothing calls this directly

Calls 3

ColorClass · 0.70
assertEqualMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected