SF #1027105: HardwareRandom should be renamed OSRandom
Renamed the new generator at Trevor's recommendation.
The name HardwareRandom suggested a bit more than it
delivered (no radioactive decay detectors or such).
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py
index f30ed1f..b8d0b5d 100644
--- a/Lib/test/test_random.py
+++ b/Lib/test/test_random.py
@@ -164,8 +164,8 @@
self.assertRaises(UserWarning, self.gen.randrange, 2**60)
warnings.filters[:] = oldfilters
-class HardwareRandom_TestBasicOps(TestBasicOps):
- gen = random.HardwareRandom()
+class SystemRandom_TestBasicOps(TestBasicOps):
+ gen = random.SystemRandom()
def test_autoseed(self):
# Doesn't need to do anything except not fail
@@ -496,11 +496,11 @@
TestModule]
try:
- random.HardwareRandom().random()
+ random.SystemRandom().random()
except NotImplementedError:
pass
else:
- testclasses.append(HardwareRandom_TestBasicOps)
+ testclasses.append(SystemRandom_TestBasicOps)
test_support.run_unittest(*testclasses)