[Python-checkins] python/dist/src/Lib/test test_sets.py,1.2,1.3

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Tue, 20 Aug 2002 23:38:46 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv5753

Modified Files:
	test_sets.py 
Log Message:
Add regression test for proper construction of sets of sets.


Index: test_sets.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_sets.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_sets.py	20 Aug 2002 21:51:59 -0000	1.2
--- test_sets.py	21 Aug 2002 06:38:44 -0000	1.3
***************
*** 133,136 ****
--- 133,145 ----
  #==============================================================================
  
+ 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):
***************
*** 537,540 ****
--- 546,550 ----
  def makeAllTests():
      suite = unittest.TestSuite()
+     suite.addTest(unittest.makeSuite(TestSetOfSets))
      suite.addTest(unittest.makeSuite(TestBasicOpsEmpty))
      suite.addTest(unittest.makeSuite(TestBasicOpsSingleton))