From c3e61e5c52213cb37ac48439e555728dd88dfcb2 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Wed, 21 Aug 2002 06:38:44 +0000 Subject: Add regression test for proper construction of sets of sets. --- Lib/test/test_sets.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py index 22a9db5..a2aa69a 100644 --- a/Lib/test/test_sets.py +++ b/Lib/test/test_sets.py @@ -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): def setUp(self): self.set = Set((2, 4, 6)) @@ -536,6 +545,7 @@ class TestCopyingNested(TestCopying): 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)) -- cgit v0.12