We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 542576b commit 950bd59Copy full SHA for 950bd59
tests/zrandom_test.py
@@ -24,3 +24,21 @@ def test_get_predictable_random():
24
for i in range(1000):
25
pass2.append(rand.get_random(100))
26
assert pass1 == pass2
27
+
28
29
+def test_get_predictable_random_then_random():
30
+ container = Container()
31
+ rand = cast(ZRandom, container.resolve("ZRandom"))
32
+ rand.set_seed(42)
33
+ pass1 = []
34
+ for i in range(1000):
35
+ pass1.append(rand.get_random(100))
36
+ rand.set_seed(0)
37
+ pass2 = []
38
39
+ pass2.append(rand.get_random(100))
40
+ assert pass1 != pass2
41
+ pass3 = []
42
43
+ pass3.append(rand.get_random(100))
44
+ assert pass2 != pass3
0 commit comments