Пример #1
0
def test_array_reset():
    array_ds = Stream('a', [1, 2, 3])
    assert array_ds.forward() == 1
    assert array_ds.forward() == 2
    assert array_ds.forward() == 3

    array_ds.reset()
    assert array_ds.forward() == 1
    assert array_ds.forward() == 2
    assert array_ds.forward() == 3
Пример #2
0
def test_array_reset():
    array_ds = Stream([1, 2, 3]).rename("a")
    assert array_ds.forward() == 1
    assert array_ds.forward() == 2
    assert array_ds.forward() == 3

    array_ds.reset()
    assert array_ds.forward() == 1
    assert array_ds.forward() == 2
    assert array_ds.forward() == 3
Пример #3
0
def test_array_next():

    array_ds = Stream('a', [1, 2, 3])

    next_value = array_ds.forward()

    assert next_value == 1
Пример #4
0
def test_array_next():

    array_ds = Stream([1, 2, 3]).rename("a")

    next_value = array_ds.forward()

    assert next_value == 1