summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_set.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-07-27 20:29:18 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-07-27 20:29:18 (GMT)
commit63853bbdc4d116386d617542a7d2da2233352bca (patch)
treec4ea197fa1b91fa7671b0d9f1493ce2eba1a24e5 /Lib/test/test_set.py
parent7bc66b10099552dae79fab232ea643296e10876e (diff)
downloadcpython-63853bbdc4d116386d617542a7d2da2233352bca.zip
cpython-63853bbdc4d116386d617542a7d2da2233352bca.tar.gz
cpython-63853bbdc4d116386d617542a7d2da2233352bca.tar.bz2
Issue 6573: Fix set.union() for cases where self is in the argument chain.
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r--Lib/test/test_set.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index 15d3c6f..222726c 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -82,6 +82,10 @@ class TestJointOps(unittest.TestCase):
self.assertEqual(self.thetype('abcba').union(C('ef')), set('abcef'))
self.assertEqual(self.thetype('abcba').union(C('ef'), C('fg')), set('abcefg'))
+ # Issue #6573
+ x = self.thetype()
+ self.assertEqual(x.union(set([1]), x, set([2])), self.thetype([1, 2]))
+
def test_or(self):
i = self.s.union(self.otherword)
self.assertEqual(self.s | set(self.otherword), i)