From bf1add74bedc8bb72872208225ba222025c45878 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 6 Mar 2023 00:34:40 +0000 Subject: [PATCH] Remove duplicate test This method is identical to `test_hash_eq` on lines 2296-2304: https://github.com/python/typing_extensions/blob/a0858e6ba9b46996f3f74dde8749ab86e1561012/src/test_typing_extensions.py#L2296-L2304 (This is a backport of the only relevant part of https://github.com/python/cpython/pull/102445) --- src/test_typing_extensions.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/test_typing_extensions.py b/src/test_typing_extensions.py index ad32e0e2..7f9e59ae 100644 --- a/src/test_typing_extensions.py +++ b/src/test_typing_extensions.py @@ -2368,16 +2368,6 @@ class C: get_type_hints(C, globals())["const"], Annotated[Final[int], "Const"] ) - def test_hash_eq(self): - self.assertEqual(len({Annotated[int, 4, 5], Annotated[int, 4, 5]}), 1) - self.assertNotEqual(Annotated[int, 4, 5], Annotated[int, 5, 4]) - self.assertNotEqual(Annotated[int, 4, 5], Annotated[str, 4, 5]) - self.assertNotEqual(Annotated[int, 4], Annotated[int, 4, 4]) - self.assertEqual( - {Annotated[int, 4, 5], Annotated[int, 4, 5], Annotated[T, 4, 5]}, - {Annotated[int, 4, 5], Annotated[T, 4, 5]} - ) - def test_cannot_subclass(self): with self.assertRaisesRegex(TypeError, "Cannot subclass .*Annotated"): class C(Annotated):