summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sets.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-08-21 06:38:44 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-08-21 06:38:44 (GMT)
commitc3e61e5c52213cb37ac48439e555728dd88dfcb2 (patch)
tree284ce4dff3409dbfccff2ed2756c4e046fdfda52 /Lib/test/test_sets.py
parenta6e16a86c47b151151c1ef6fcb5feb51543e7feb (diff)
downloadcpython-c3e61e5c52213cb37ac48439e555728dd88dfcb2.zip
cpython-c3e61e5c52213cb37ac48439e555728dd88dfcb2.tar.gz
cpython-c3e61e5c52213cb37ac48439e555728dd88dfcb2.tar.bz2
Add regression test for proper construction of sets of sets.
Diffstat (limited to 'Lib/test/test_sets.py')
-rw-r--r--Lib/test/test_sets.py10
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))