Skip to content

Commit

Permalink
Remove duplicate test
Browse files Browse the repository at this point in the history
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 python/cpython#102445)
  • Loading branch information
AlexWaygood authored Mar 6, 2023
1 parent a0858e6 commit bf1add7
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/test_typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit bf1add7

Please sign in to comment.