Commit e53c5800 authored by Dong-hee Na's avatar Dong-hee Na Committed by Serhiy Storchaka

test_dictviews: Add testcase for dictviews_sub (GH-16660)

parent 10cd00a9
......@@ -219,11 +219,13 @@ class DictSetTest(unittest.TestCase):
self.assertEqual(origin.keys() & iter([1, 2]), {1})
self.assertEqual(origin.keys() | iter([1, 2]), {1, 2, 3})
self.assertEqual(origin.keys() ^ iter([1, 2]), {2, 3})
self.assertEqual(origin.keys() - iter([1, 2]), {3})
items = origin.items()
self.assertEqual(items & iter([(1, 2)]), {(1, 2)})
self.assertEqual(items ^ iter([(1, 2)]), {(3, 4)})
self.assertEqual(items | iter([(1, 2)]), {(1, 2), (3, 4)})
self.assertEqual(items - iter([(1, 2)]), {(3, 4)})
def test_recursive_repr(self):
d = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment