mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Test py::iterable/py::iterator representation in docstrings
This commit is contained in:
committed by
Wenzel Jakob
parent
4f1531c454
commit
ab323e04f3
@@ -5,9 +5,19 @@ import sys
|
||||
from pybind11_tests import pytypes as m
|
||||
from pybind11_tests import debug_enabled
|
||||
|
||||
|
||||
def test_int(doc):
|
||||
assert doc(m.get_int) == "get_int() -> int"
|
||||
|
||||
|
||||
def test_iterator(doc):
|
||||
assert doc(m.get_iterator) == "get_iterator() -> Iterator"
|
||||
|
||||
|
||||
def test_iterable(doc):
|
||||
assert doc(m.get_iterable) == "get_iterable() -> Iterable"
|
||||
|
||||
|
||||
def test_list(capture, doc):
|
||||
with capture:
|
||||
lst = m.get_list()
|
||||
|
||||
Reference in New Issue
Block a user