summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dictviews.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-03-04 06:08:01 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-03-04 06:08:01 (GMT)
commitcfc2a1fc700e1f93a2e1d9a3de02bb936f868a42 (patch)
tree34317302024fd957eca4cb5a7b759fca2a4208b3 /Lib/test/test_dictviews.py
parentff47cfbc66b30e0714495cc74f92fa009bd8c1ca (diff)
parentf11b25b0813a1c07ddf55cca1512ef65eb97a636 (diff)
downloadcpython-cfc2a1fc700e1f93a2e1d9a3de02bb936f868a42.zip
cpython-cfc2a1fc700e1f93a2e1d9a3de02bb936f868a42.tar.gz
cpython-cfc2a1fc700e1f93a2e1d9a3de02bb936f868a42.tar.bz2
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 787ef20..ab23ca1 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()))