Skip to content

Commit

Permalink
Revert "Also add a test for TypedDict classes"
Browse files Browse the repository at this point in the history
This reverts commit 7ccff63.
  • Loading branch information
AlexWaygood committed Nov 9, 2023
1 parent 0d13e83 commit e4e968a
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8101,23 +8101,6 @@ class T4(TypedDict, Generic[S]): pass
self.assertEqual(klass.__optional_keys__, set())
self.assertIsInstance(klass(), dict)

def test_setname_called_on_things_in_class_namespace(self):
class CustomException(Exception): pass

class Annoying:
def __set_name__(self, owner, name):
raise CustomException("Cannot do that!")

with self.assertRaisesRegex(CustomException, "Cannot do that!") as cm:
class Foo(TypedDict):
attr = Annoying()

expected_note = (
"Error calling __set_name__ on 'Annoying' instance "
"'attr' in 'Foo'"
)
self.assertIn(expected_note, cm.exception.__notes__)


class RequiredTests(BaseTestCase):

Expand Down

0 comments on commit e4e968a

Please sign in to comment.