diff options
author | Raymond Hettinger <python@rcn.com> | 2008-06-11 00:44:47 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-06-11 00:44:47 (GMT) |
commit | 610a93ea2623ff324c99c52147d78838335ae900 (patch) | |
tree | acc69052d2628f24ab3a0aa48968d50d4c8f1bb0 /Lib/test/test_set.py | |
parent | 363070aa463d9eed4bf815c288067a1716ef3aaa (diff) | |
download | cpython-610a93ea2623ff324c99c52147d78838335ae900.zip cpython-610a93ea2623ff324c99c52147d78838335ae900.tar.gz cpython-610a93ea2623ff324c99c52147d78838335ae900.tar.bz2 |
Handle the case with zero 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 729cc3b..b32d953 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -104,6 +104,12 @@ class TestJointOps(unittest.TestCase): 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')) + s = self.thetype('abcba') + z = s.intersection() + if self.thetype == frozenset(): + self.assertEqual(id(s), id(z)) + else: + self.assertNotEqual(id(s), id(z)) def test_isdisjoint(self): def f(s1, s2): |