mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.14] gh-133925: Make typing._UnionGenericAlias hashable (GH-133929) (#133936)
gh-133925: Make typing._UnionGenericAlias hashable (GH-133929)
(cherry picked from commit 8d478c7953
)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
ecc12bff24
commit
89c801b84e
3 changed files with 7 additions and 0 deletions
|
@ -10731,6 +10731,9 @@ class UnionGenericAliasTests(BaseTestCase):
|
|||
with self.assertWarns(DeprecationWarning):
|
||||
self.assertNotEqual(int, typing._UnionGenericAlias)
|
||||
|
||||
def test_hashable(self):
|
||||
self.assertEqual(hash(typing._UnionGenericAlias), hash(Union))
|
||||
|
||||
|
||||
def load_tests(loader, tests, pattern):
|
||||
import doctest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue