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

Method test_shadowed_attr

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

Source from the content-addressed store, hash-verified

1097 enum_type = StrEnum
1098 #
1099 def test_shadowed_attr(self):
1100 class Book(StrEnum):
1101 author = 'author'
1102 title = 'title'
1103 #
1104 self.assertEqual(Book.author.title(), 'Author')
1105 self.assertEqual(Book.title.title(), 'Title')
1106 self.assertIs(Book.title.author, Book.author)
1107
1108
1109class TestStrEnumFunction(_EnumTests, _MinimalOutputTests, unittest.TestCase):

Callers

nothing calls this directly

Calls 3

assertEqualMethod · 0.45
titleMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected