summaryrefslogtreecommitdiff
path: root/Lib/test/test_dictviews.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-03-03 22:08:01 -0800
committerBenjamin Peterson <benjamin@python.org>2016-03-03 22:08:01 -0800
commitb5d7b111f4e769734548a6cce65bd5b4e6eca164 (patch)
treeb3ec58192ce1748486174f98a0d2cebbf9a9428c /Lib/test/test_dictviews.py
parent2703459c3ae5857da0fa9412ad9fa3be57009b33 (diff)
parent27329865692dddbcc3ba9e94698de38212d7c48e (diff)
downloadcpython-b5d7b111f4e769734548a6cce65bd5b4e6eca164.tar.gz
merge 3.4 (closes #26478)
Diffstat (limited to 'Lib/test/test_dictviews.py')
-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 787ef20c47..ab23ca1cf7 100644
--- a/Lib/test/test_dictviews.py
+++ b/Lib/test/test_dictviews.py
@@ -96,6 +96,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'})
@@ -104,6 +105,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'})
@@ -112,6 +114,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'})
@@ -119,6 +122,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()))