MCPcopy Create free account
hub / github.com/PyVRP/PyVRP / test_call

Function test_call

tests/test_RandomNumberGenerator.py:17–30  ·  view source on GitHub ↗

Calling the RNG as a function returns random integers, in a fixed sequence depending on the seed.

()

Source from the content-addressed store, hash-verified

15
16
17def test_call():
18 """
19 Calling the RNG as a function returns random integers, in a fixed sequence
20 depending on the seed.
21 """
22 rng = RandomNumberGenerator(seed=42)
23
24 assert_equal(rng(), 2386648076)
25 assert_equal(rng(), 1236469084)
26
27 rng = RandomNumberGenerator(seed=43)
28
29 assert_equal(rng(), 2386648077)
30 assert_equal(rng(), 1236469085)
31
32
33def test_randint():

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected