Skip to main content

✅ Choice returns element from list

CategoryAbility
StatusPassing
Testtests/test_rng.py::test_choice_returns_element_from_list

choice() always returns an element that is in the list.

Preconditions

  • rng = DeterministicRNG(seed=0)

  • options = ["x", "y", "z"]

Action

  • Pick 20 times.

Expected Postconditions

  • Every pick is in ["x", "y", "z"].

Assertions

assert result in options