mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
ed20ad8473
commit
b871763156
|
@ -490,11 +490,14 @@ class TestModule(unittest.TestCase):
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue