def test_values_int_variable(): ctx = Qit() x = Variable(Int(), "x") y = Variable(Int(), "y") r = Int().values(x, 7, y) result = ctx.run(r.iterate(), args={"x": 2, "y": 11}) assert result == [2, 7, 11]
def test_int_values(): v = Int().values(30, 20, 10) result = Qit().run(v.iterate()) assert result == [30, 20, 10] result = Qit().run(v.generate().take(100)) for i in result: assert i in (30, 20, 10)
def test_values_int_empty(): v = Int().values() result = Qit().run(v.iterate()) assert result == []