def test_slice(data): pars, expected = data a = Stream() b = a.slice(*pars) out = b.sink_to_list() for i in range(6): a.emit(i) assert out == expected
def test_slice_err(): a = Stream() with pytest.raises(ValueError): a.slice(end=-1)
def test_slice(data): pars, expected = data a = Stream() b = a.slice(*pars) out = b.sink_to_list() for i in range(6): a.emit(i) assert out == expected
def test_slice_err(): a = Stream() with pytest.raises(ValueError): a.slice(end=-1)