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

Function test_rng_has_given_state

tests/test_RandomNumberGenerator.py:61–67  ·  view source on GitHub ↗

Tests that setting the RNG with a given state, and then requesting that state, returns the same state.

(state: list[int])

Source from the content-addressed store, hash-verified

59
60@mark.parametrize("state", [[1, 2, 3, 4], [10, 14, 274, 83]])
61def test_rng_has_given_state(state: list[int]):
62 """
63 Tests that setting the RNG with a given state, and then requesting that
64 state, returns the same state.
65 """
66 rng = RandomNumberGenerator(state=state)
67 assert_equal(rng.state(), state)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected