diff options
author | Raymond Hettinger <python@rcn.com> | 2009-07-27 20:16:37 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-07-27 20:16:37 (GMT) |
commit | e805ecc75237521818439c3c716c1017fcc7127e (patch) | |
tree | 29301f0fd638dd628585d718f9e0dfe563df5b7b /Lib/test | |
parent | e7ac4f7745b6c1ec708cb88ab13f15bcfc130fc7 (diff) | |
download | cpython-e805ecc75237521818439c3c716c1017fcc7127e.zip cpython-e805ecc75237521818439c3c716c1017fcc7127e.tar.gz cpython-e805ecc75237521818439c3c716c1017fcc7127e.tar.bz2 |
Issue 6573: Fix set.union() for cases where self is in the argument chain.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_set.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index a13f886..2b43a16 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) |