diff options
| author | Guido van Rossum <guido@python.org> | 2016-04-18 07:37:41 -0700 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2016-04-18 07:37:41 -0700 |
| commit | 5abcbb3ee531ed7587b465d487ec9b4bab03a7ff (patch) | |
| tree | 12042585038cfb6af374c346d1b49f8c6ef562d8 /Lib/test | |
| parent | c1b578608ef397dcc7a64ff1228aa770e2b65cb2 (diff) | |
| download | cpython-git-5abcbb3ee531ed7587b465d487ec9b4bab03a7ff.tar.gz | |
typing.py: Consider ellipsis in TupleMeta.__eq__. By Kalle Tuure. github.com/python/typing/pull/201.
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_typing.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index b39efcf019..47118edc69 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -359,6 +359,12 @@ class TupleTests(TestCase): self.assertTrue(issubclass(tuple, Tuple)) self.assertFalse(issubclass(Tuple, tuple)) # Can't have it both ways. + def test_equality(self): + assert Tuple[int] == Tuple[int] + assert Tuple[int, ...] == Tuple[int, ...] + assert Tuple[int] != Tuple[int, int] + assert Tuple[int] != Tuple[int, ...] + def test_tuple_subclass(self): class MyTuple(tuple): pass |
