diff options
author | Raymond Hettinger <python@rcn.com> | 2008-06-09 13:07:27 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-06-09 13:07:27 (GMT) |
commit | 5c4d3d0e4c6b533dbfbab36ad8034010fe90cf69 (patch) | |
tree | 941131a004cf5bac5197ad5fdd0b11b91aaae50c /Lib/test/test_set.py | |
parent | d62341414109ff16d6477e370e380c6dec9db9d6 (diff) | |
download | cpython-5c4d3d0e4c6b533dbfbab36ad8034010fe90cf69.zip cpython-5c4d3d0e4c6b533dbfbab36ad8034010fe90cf69.tar.gz cpython-5c4d3d0e4c6b533dbfbab36ad8034010fe90cf69.tar.bz2 |
Let set.intersection() and set.intersection_update() take multiple input arguments.
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r-- | Lib/test/test_set.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index 37a085c..729cc3b 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -103,6 +103,7 @@ class TestJointOps(unittest.TestCase): self.assertEqual(self.thetype('abcba').intersection(C('efgfe')), set('')) self.assertEqual(self.thetype('abcba').intersection(C('ccb')), set('bc')) self.assertEqual(self.thetype('abcba').intersection(C('ef')), set('')) + self.assertEqual(self.thetype('abcba').intersection(C('cbcf'), C('bag')), set('b')) def test_isdisjoint(self): def f(s1, s2): @@ -429,6 +430,11 @@ class TestSet(TestJointOps): s = self.thetype('abcba') self.assertEqual(s.intersection_update(C(p)), None) self.assertEqual(s, set(q)) + ss = 'abcba' + s = self.thetype(ss) + t = 'cbc' + self.assertEqual(s.intersection_update(C(p), C(t)), None) + self.assertEqual(s, set('abcba')&set(p)&set(t)) def test_iand(self): self.s &= set(self.otherword) |