mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue 6573: Fix set.union() for cases where self is in the argument chain.
This commit is contained in:
parent
7bc66b1009
commit
63853bbdc4
3 changed files with 8 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue