[Python-checkins] python/dist/src/Lib/test test_os.py,1.25,1.26
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Sun Aug 29 17:46:37 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13928/Lib/test
Modified Files:
test_os.py
Log Message:
Patch #934711: Expose platform-specific entropy.
Index: test_os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_os.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- test_os.py 8 Jun 2004 20:34:34 -0000 1.25
+++ test_os.py 29 Aug 2004 15:46:34 -0000 1.26
@@ -343,6 +343,16 @@
self.assertEqual(f.read(), '')
f.close()
+class URandomTests (unittest.TestCase):
+ def test_urandom(self):
+ try:
+ self.assertEqual(len(os.urandom(1)), 1)
+ self.assertEqual(len(os.urandom(10)), 10)
+ self.assertEqual(len(os.urandom(100)), 100)
+ self.assertEqual(len(os.urandom(1000)), 1000)
+ except NotImplementedError:
+ pass
+
def test_main():
test_support.run_unittest(
TemporaryFileTests,
@@ -351,6 +361,7 @@
WalkTests,
MakedirTests,
DevNullTests,
+ URandomTests
)
if __name__ == "__main__":
More information about the Python-checkins
mailing list