[Python-checkins] python/dist/src/Lib/test test_random.py, 1.20, 1.21

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Tue Sep 14 00:23:23 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4508/Lib/test

Modified Files:
	test_random.py 
Log Message:
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).



Index: test_random.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_random.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- test_random.py	5 Sep 2004 00:00:42 -0000	1.20
+++ test_random.py	13 Sep 2004 22:23:20 -0000	1.21
@@ -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)
 



More information about the Python-checkins mailing list