chiark
/
gitweb
/
~mdw
/
catacomb-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
t/t-rand.py: Set the correct refernce seed value for `dsarand'.
[catacomb-python]
/
t
/
t-rand.py
diff --git
a/t/t-rand.py
b/t/t-rand.py
index d8d7b00417e914bb1b279c7e6483492919c168b6..a45c1d599410644a647170c01109cdb7b4fbb86a 100644
(file)
--- a/
t/t-rand.py
+++ b/
t/t-rand.py
@@
-121,7
+121,10
@@
class TestRandomGenerator (U.TestCase):
n = C.MP.loadb(seed)
rng = C.DSARand(seed)
me.check_rand(rng)
n = C.MP.loadb(seed)
rng = C.DSARand(seed)
me.check_rand(rng)
- me.assertEqual(rng.seed, (n + 153 + 3).storeb(16))
+ if T.MAXFIXNUM == (1 << 31) - 1: steps = 153 + 3
+ elif T.MAXFIXNUM == (1 << 63) - 1: steps = 153
+ else: steps = None
+ if steps is not None: me.assertEqual(rng.seed, (n + steps).storeb(16))
def test_bbs(me):
ev = T.EventRecorder()
def test_bbs(me):
ev = T.EventRecorder()