diff options
Diffstat (limited to 'Lib/test/test_random.py')
-rw-r--r-- | Lib/test/test_random.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index 139e8bf..f30ed1f 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -495,7 +495,11 @@ def test_main(verbose=None): TestDistributions, TestModule] - if random._urandom is not None: + try: + random.HardwareRandom().random() + except NotImplementedError: + pass + else: testclasses.append(HardwareRandom_TestBasicOps) test_support.run_unittest(*testclasses) |