mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
[3.9] bpo-45679: Fix caching of multi-value typing.Literal (GH-29334) (GH-29342)
Literal[True, 2] is no longer equal to Literal[1, 2]..
(cherry picked from commit 634984d7db)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
5f527caf15
commit
bbcf06bf95
3 changed files with 9 additions and 6 deletions
|
|
@ -562,6 +562,8 @@ def test_equal(self):
|
|||
self.assertNotEqual(Literal[True], Literal[1])
|
||||
self.assertNotEqual(Literal[1], Literal[2])
|
||||
self.assertNotEqual(Literal[1, True], Literal[1])
|
||||
self.assertNotEqual(Literal[1, True], Literal[1, 1])
|
||||
self.assertNotEqual(Literal[1, 2], Literal[True, 2])
|
||||
self.assertEqual(Literal[1], Literal[1])
|
||||
self.assertEqual(Literal[1, 2], Literal[2, 1])
|
||||
self.assertEqual(Literal[1, 2, 3], Literal[1, 2, 3, 3])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue