[Python-checkins] python/nondist/sandbox/twister test_random.py,1.4,1.5

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
2002年12月28日 23:07:04 -0800


Update of /cvsroot/python/python/nondist/sandbox/twister
In directory sc8-pr-cvs1:/tmp/cvs-serv24793
Modified Files:
	test_random.py 
Log Message:
Documented the test subclass requirement. Simplified test suite creation.
Index: test_random.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/twister/test_random.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_random.py	29 Dec 2002 07:03:15 -0000	1.4
--- test_random.py	29 Dec 2002 07:07:02 -0000	1.5
***************
*** 8,12 ****
 
 class TestBasicOps(unittest.TestCase):
! # Superclass with tests common to all generators
 
 def randomlist(self, n):
--- 8,14 ----
 
 class TestBasicOps(unittest.TestCase):
! # Superclass with tests common to all generators.
! # Subclasses must arrange for self.gen to retrieve the Random instance
! # to be tested.
 
 def randomlist(self, n):
***************
*** 123,129 ****
 def test_main():
 suite = unittest.TestSuite()
! suite.addTest(unittest.makeSuite(WichmannHill_TestBasicOps))
! suite.addTest(unittest.makeSuite(MersenneTwister_TestBasicOps))
! suite.addTest(unittest.makeSuite(TestModule))
 test_support.run_suite(suite)
 
--- 125,132 ----
 def test_main():
 suite = unittest.TestSuite()
! for testclass in (WichmannHill_TestBasicOps,
! MersenneTwister_TestBasicOps,
! TestModule):
! suite.addTest(unittest.makeSuite(testclass))
 test_support.run_suite(suite)
 

AltStyle によって変換されたページ (->オリジナル) /