diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-05-05 17:16:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 17:16:06 (GMT) |
commit | 1ed8d035f1edfaec34016b9f8d615df9e9fe9414 (patch) | |
tree | 627f74c12cf8a38ab7c8061449ff309a48b75725 /Lib/test/test_genericalias.py | |
parent | 354ab7a5c812bf103f7aed5405f02fc81fda5b58 (diff) | |
download | cpython-1ed8d035f1edfaec34016b9f8d615df9e9fe9414.zip cpython-1ed8d035f1edfaec34016b9f8d615df9e9fe9414.tar.gz cpython-1ed8d035f1edfaec34016b9f8d615df9e9fe9414.tar.bz2 |
gh-87390: Fix starred tuple equality and pickling (GH-92337)
Diffstat (limited to 'Lib/test/test_genericalias.py')
-rw-r--r-- | Lib/test/test_genericalias.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_genericalias.py b/Lib/test/test_genericalias.py index 2d2adc1..5fba74e 100644 --- a/Lib/test/test_genericalias.py +++ b/Lib/test/test_genericalias.py @@ -358,6 +358,8 @@ class BaseTest(unittest.TestCase): self.assertNotEqual(dict[str, int], dict[str, str]) self.assertNotEqual(list, list[int]) self.assertNotEqual(list[int], list) + self.assertNotEqual(list[int], tuple[int]) + self.assertNotEqual((*tuple[int],)[0], tuple[int]) def test_isinstance(self): self.assertTrue(isinstance([], list)) @@ -394,6 +396,7 @@ class BaseTest(unittest.TestCase): self.assertEqual(loaded.__origin__, alias.__origin__) self.assertEqual(loaded.__args__, alias.__args__) self.assertEqual(loaded.__parameters__, alias.__parameters__) + self.assertEqual(type(loaded), type(alias)) def test_copy(self): class X(list): |