mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Add regression test for proper construction of sets of sets.
This commit is contained in:
parent
a6e16a86c4
commit
c3e61e5c52
1 changed files with 10 additions and 0 deletions
|
@ -132,6 +132,15 @@ class TestBasicOpsTriple(TestBasicOps):
|
||||||
|
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
|
|
||||||
|
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):
|
class TestBinaryOps(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.set = Set((2, 4, 6))
|
self.set = Set((2, 4, 6))
|
||||||
|
@ -536,6 +545,7 @@ class TestCopyingNested(TestCopying):
|
||||||
|
|
||||||
def makeAllTests():
|
def makeAllTests():
|
||||||
suite = unittest.TestSuite()
|
suite = unittest.TestSuite()
|
||||||
|
suite.addTest(unittest.makeSuite(TestSetOfSets))
|
||||||
suite.addTest(unittest.makeSuite(TestBasicOpsEmpty))
|
suite.addTest(unittest.makeSuite(TestBasicOpsEmpty))
|
||||||
suite.addTest(unittest.makeSuite(TestBasicOpsSingleton))
|
suite.addTest(unittest.makeSuite(TestBasicOpsSingleton))
|
||||||
suite.addTest(unittest.makeSuite(TestBasicOpsTuple))
|
suite.addTest(unittest.makeSuite(TestBasicOpsTuple))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue