summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-07-27 20:32:04 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-07-27 20:32:04 (GMT)
commitc2b9e1a134bef289445d0779d26b6ccf36d03077 (patch)
tree2d275d38c69c1e6140121e5d76c8e7aaa91f5c26 /Lib
parent794b2a78d066f0d1c504fdab9a6e513a346d6e69 (diff)
downloadcpython-c2b9e1a134bef289445d0779d26b6ccf36d03077.zip
cpython-c2b9e1a134bef289445d0779d26b6ccf36d03077.tar.gz
cpython-c2b9e1a134bef289445d0779d26b6ccf36d03077.tar.bz2
Issue 6573: Fix set.union() for cases where self is in the argument chain.
Diffstat (limited to 'Lib')
-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 872e9ea..bc7465a 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -81,6 +81,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)