[pypy-svn] r32415 - pypy/dist/pypy/module/_random/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Sun Sep 17 16:09:00 CEST 2006
Author: cfbolz
Date: Sun Sep 17 16:08:59 2006
New Revision: 32415
Modified:
pypy/dist/pypy/module/_random/test/test_mersenne.py
Log:
add test for init_by_array
Modified: pypy/dist/pypy/module/_random/test/test_mersenne.py
==============================================================================
--- pypy/dist/pypy/module/_random/test/test_mersenne.py (original)
+++ pypy/dist/pypy/module/_random/test/test_mersenne.py Sun Sep 17 16:08:59 2006
@@ -15,3 +15,9 @@
44058974, 2070996316, 1549632257, 3747249597, 3650674304,
911961945, 58396205, 174846504, 1478498153]
+def test_init_by_array():
+ rnd = Random()
+ rnd.init_by_array([1, 2, 3, 4])
+ assert rnd.state[:14] == [2147483648, 1269538435, 699006892, 381364451,
+ 172015551, 3237099449, 3609464087, 2187366456, 654585064,
+ 2665903765, 3735624613, 1241943673, 2038528247, 3774211972]
More information about the Pypy-commit
mailing list