MCPcopy Create free account
hub / github.com/pybind/pybind11 / test_nonref_iterators

Function test_nonref_iterators

tests/test_sequences_and_iterators.py:49–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47
48
49def test_nonref_iterators():
50 pairs = m.IntPairs([(1, 2), (3, 4), (0, 5)])
51 assert list(pairs.nonref()) == [(1, 2), (3, 4), (0, 5)]
52 assert list(pairs.nonref_keys()) == [1, 3, 0]
53 assert list(pairs.nonref_values()) == [2, 4, 5]
54
55
56def test_generalized_iterators_simple():

Callers

nothing calls this directly

Calls 2

listClass · 0.85
IntPairsMethod · 0.80

Tested by

no test coverage detected