mirror of https://github.com/python/cpython.git
Add regression test for proper construction of sets of sets.
This commit is contained in:
parent
a6e16a86c4
commit
c3e61e5c52
|
@ -132,6 +132,15 @@ def setUp(self):
|
|||
|
||||
#==============================================================================
|
||||
|
||||
class TestSetOfSets(unittest.TestCase):
|
||||
def test_constructor(self):
|
||||
inner = Set([1])
|
||||
outer = Set([inner])
|
||||
element = outer.pop()
|
||||
assert type(element) == ImmutableSet, "Construct set of sets"
|
||||
|
||||
#==============================================================================
|
||||
|
||||
class TestBinaryOps(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.set = Set((2, 4, 6))
|
||||
|
@ -536,6 +545,7 @@ def setUp(self):
|
|||
|
||||
def makeAllTests():
|
||||
suite = unittest.TestSuite()
|
||||
suite.addTest(unittest.makeSuite(TestSetOfSets))
|
||||
suite.addTest(unittest.makeSuite(TestBasicOpsEmpty))
|
||||
suite.addTest(unittest.makeSuite(TestBasicOpsSingleton))
|
||||
suite.addTest(unittest.makeSuite(TestBasicOpsTuple))
|
||||
|
|
Loading…
Reference in New Issue