python/dist/src/Lib/test test_random.py, 1.18, 1.19
Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12609 Modified Files: test_random.py Log Message: SF bug #1022010: Import random fails * Complete the previous patch by making sure that the MachineRandom tests are only run when the underlying resource is available. Index: test_random.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_random.py,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- test_random.py 30 Aug 2004 06:14:30 -0000 1.18 +++ test_random.py 4 Sep 2004 20:13:29 -0000 1.19 @@ -490,11 +490,14 @@ self.failUnless(set(random.__all__) <= set(dir(random))) def test_main(verbose=None): - testclasses = (WichmannHill_TestBasicOps, + testclasses = [WichmannHill_TestBasicOps, MersenneTwister_TestBasicOps, - HardwareRandom_TestBasicOps, TestDistributions, - TestModule) + TestModule] + + if random._urandom is not None: + testclasses.append(HardwareRandom_TestBasicOps) + test_support.run_unittest(*testclasses) # verify reference counting
participants (1)
-
rhettingerīŧ users.sourceforge.net