1 from pybind11_tests
import docstring_options
as m
6 assert not m.test_function1.__doc__
8 assert m.test_function2.__doc__ ==
"A custom docstring" 11 assert m.test_overloaded1.__doc__ ==
"Overload docstring" 14 assert m.test_overloaded2.__doc__ ==
"overload docstring 1\noverload docstring 2" 17 assert m.test_overloaded3.__doc__ ==
"Overload docstr" 20 assert m.test_function3.__doc__.startswith(
"test_function3(a: int, b: int) -> None")
22 assert m.test_function4.__doc__.startswith(
"test_function4(a: int, b: int) -> None")
23 assert m.test_function4.__doc__.endswith(
"A custom docstring\n")
27 assert not m.test_function5.__doc__
30 assert m.test_function6.__doc__ ==
"A custom docstring" 33 assert m.test_function7.__doc__.startswith(
"test_function7(a: int, b: int) -> None")
34 assert m.test_function7.__doc__.endswith(
"A custom docstring\n")
37 assert m.test_function8.__doc__
is None 40 assert not m.DocstringTestFoo.__doc__
41 assert not m.DocstringTestFoo.value_prop.__doc__
def test_docstring_options()