Skip to content

Conversation

AlexWaygood
Copy link
Member

This method is identical to test_hash_eq on lines 2296-2304:

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]}
)

(This is a backport of the only relevant part of python/cpython#102445)

@JelleZijlstra JelleZijlstra merged commit ac52ac5 into python:main Mar 6, 2023
@AlexWaygood AlexWaygood deleted the patch-1 branch March 6, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants