MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_shadowed_attr

Method test_shadowed_attr

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

Source from the content-addressed store, hash-verified

1110 enum_type = StrEnum
1111 #
1112 def test_shadowed_attr(self):
1113 Book = StrEnum('Book', ('author', 'title'))
1114 #
1115 self.assertEqual(Book.author.title(), 'Author')
1116 self.assertEqual(Book.title.title(), 'Title')
1117 self.assertIs(Book.title.author, Book.author)
1118
1119
1120class TestIntFlagClass(_EnumTests, _MinimalOutputTests, _FlagTests, unittest.TestCase):

Callers

nothing calls this directly

Calls 4

StrEnumClass · 0.90
assertEqualMethod · 0.45
titleMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected