summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-03-04 06:05:36 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-03-04 06:05:36 (GMT)
commitf11b25b0813a1c07ddf55cca1512ef65eb97a636 (patch)
tree545c770c505f61b94535e35acc7a85f61ae31932 /Lib
parent25c0ef518d0e9267c4d31284a3ad93d4559d84c6 (diff)
downloadcpython-f11b25b0813a1c07ddf55cca1512ef65eb97a636.zip
cpython-f11b25b0813a1c07ddf55cca1512ef65eb97a636.tar.gz
cpython-f11b25b0813a1c07ddf55cca1512ef65eb97a636.tar.bz2
properly use the ObjArgs variant of CallMethod in dictview binary operations (closes #26478)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_dictviews.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_dictviews.py b/Lib/test/test_dictviews.py
index c7714cf..5f2144a 100644
--- a/Lib/test/test_dictviews.py
+++ b/Lib/test/test_dictviews.py
@@ -97,6 +97,7 @@ class DictSetTest(unittest.TestCase):
self.assertEqual(d1.keys() & set(d1.keys()), {'a', 'b'})
self.assertEqual(d1.keys() & set(d2.keys()), {'b'})
self.assertEqual(d1.keys() & set(d3.keys()), set())
+ self.assertEqual(d1.keys() & tuple(d1.keys()), {'a', 'b'})
self.assertEqual(d1.keys() | d1.keys(), {'a', 'b'})
self.assertEqual(d1.keys() | d2.keys(), {'a', 'b', 'c'})
@@ -105,6 +106,7 @@ class DictSetTest(unittest.TestCase):
self.assertEqual(d1.keys() | set(d2.keys()), {'a', 'b', 'c'})
self.assertEqual(d1.keys() | set(d3.keys()),
{'a', 'b', 'd', 'e'})
+ self.assertEqual(d1.keys() | (1, 2), {'a', 'b', 1, 2})
self.assertEqual(d1.keys() ^ d1.keys(), set())
self.assertEqual(d1.keys() ^ d2.keys(), {'a', 'c'})
@@ -113,6 +115,7 @@ class DictSetTest(unittest.TestCase):
self.assertEqual(d1.keys() ^ set(d2.keys()), {'a', 'c'})
self.assertEqual(d1.keys() ^ set(d3.keys()),
{'a', 'b', 'd', 'e'})
+ self.assertEqual(d1.keys() ^ tuple(d2.keys()), {'a', 'c'})
self.assertEqual(d1.keys() - d1.keys(), set())
self.assertEqual(d1.keys() - d2.keys(), {'a'})
@@ -120,6 +123,7 @@ class DictSetTest(unittest.TestCase):
self.assertEqual(d1.keys() - set(d1.keys()), set())
self.assertEqual(d1.keys() - set(d2.keys()), {'a'})
self.assertEqual(d1.keys() - set(d3.keys()), {'a', 'b'})
+ self.assertEqual(d1.keys() - (0, 1), {'a', 'b'})
self.assertFalse(d1.keys().isdisjoint(d1.keys()))
self.assertFalse(d1.keys().isdisjoint(d2.keys()))