mirror of https://github.com/flaggo/pydu.git
add test for iter.first and iter.last
This commit is contained in:
parent
5da517dbdb
commit
47531166cb
|
@ -0,0 +1,15 @@
|
|||
import pytest
|
||||
from pydu.iter import first, last
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'iterable', (
|
||||
[1, 2],
|
||||
(1, 2),
|
||||
{1, 2},
|
||||
{1: 1, 2: 2},
|
||||
iter([1, 2])
|
||||
))
|
||||
def test_first_last(iterable):
|
||||
assert first(iterable) == 1
|
||||
assert last(iterable) == 2
|
Loading…
Reference in New Issue