Add regression test for proper construction of sets of sets.

This commit is contained in:
Raymond Hettinger 2002-08-21 06:38:44 +00:00
parent a6e16a86c4
commit c3e61e5c52
1 changed files with 10 additions and 0 deletions

View File

@ -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))