def test_random_termial_error(self, n) -> None: """Test error out when random termial is used wih negative or zero value.""" with pytest.raises(ValueError): State._random_termial(n)
def test_random_termial(self, n) -> None: """Compute random termial function value.""" x = State._random_termial(n) assert 0 <= x < n