diff options
author | Raymond Hettinger <python@rcn.com> | 2002-08-21 06:38:44 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-08-21 06:38:44 (GMT) |
commit | c3e61e5c52213cb37ac48439e555728dd88dfcb2 (patch) | |
tree | 284ce4dff3409dbfccff2ed2756c4e046fdfda52 | |
parent | a6e16a86c47b151151c1ef6fcb5feb51543e7feb (diff) | |
download | cpython-c3e61e5c52213cb37ac48439e555728dd88dfcb2.zip cpython-c3e61e5c52213cb37ac48439e555728dd88dfcb2.tar.gz cpython-c3e61e5c52213cb37ac48439e555728dd88dfcb2.tar.bz2 |
Add regression test for proper construction of sets of sets.
-rw-r--r-- | Lib/test/test_sets.py | 10 |
1 files changed, 10 insertions, 0 deletions
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)) |