mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 14:59:27 +00:00
tests: check simple iteration of pairs (#3296)
This commit is contained in:
@@ -48,6 +48,15 @@ def test_generalized_iterators():
|
||||
next(it)
|
||||
|
||||
|
||||
def test_generalized_iterators_simple():
|
||||
assert list(m.IntPairs([(1, 2), (3, 4), (0, 5)]).simple_iterator()) == [
|
||||
(1, 2),
|
||||
(3, 4),
|
||||
(0, 5),
|
||||
]
|
||||
assert list(m.IntPairs([(1, 2), (3, 4), (0, 5)]).simple_keys()) == [1, 3, 0]
|
||||
|
||||
|
||||
def test_sliceable():
|
||||
sliceable = m.Sliceable(100)
|
||||
assert sliceable[::] == (0, 100, 1)
|
||||
|
||||
Reference in New Issue
Block a user