def test_take_from_infinite(self): b = Query(infinite()).take(5).execute() c = [0, 1, 2, 3, 4] self.assertEqual(b, c)
def test_select_infinite(self): a = infinite() b = Query(a).select_where(lambda x: x % 5 == 0).take(3).execute() c = [0, 5, 10] self.assertEqual(b, c)