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

Function test_iterator_doc_annotations

tests/test_sequences_and_iterators.py:66–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64
65
66def test_iterator_doc_annotations():
67 assert m.IntPairs.nonref.__doc__.endswith(
68 "-> collections.abc.Iterator[tuple[int, int]]\n"
69 )
70 assert m.IntPairs.nonref_keys.__doc__.endswith("-> collections.abc.Iterator[int]\n")
71 assert m.IntPairs.nonref_values.__doc__.endswith(
72 "-> collections.abc.Iterator[int]\n"
73 )
74 assert m.IntPairs.simple_iterator.__doc__.endswith(
75 "-> collections.abc.Iterator[tuple[int, int]]\n"
76 )
77 assert m.IntPairs.simple_keys.__doc__.endswith("-> collections.abc.Iterator[int]\n")
78 assert m.IntPairs.simple_values.__doc__.endswith(
79 "-> collections.abc.Iterator[int]\n"
80 )
81
82
83def test_iterator_referencing():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected