summaryrefslogtreecommitdiff
path: root/Lib/test/test_set.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r--Lib/test/test_set.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index 729cc3b209..b32d953a84 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):