Pull in Annotated[list[int], FixedSize(2)] from test_stl

This commit is contained in:
Ralf W. Grosse-Kunstleve 2023-11-14 13:23:11 -08:00
parent 781304e431
commit 61ee34ee07

View File

@ -1,6 +1,7 @@
import pytest import pytest
from pybind11_tests import cases_for_stubgen as m from pybind11_tests import cases_for_stubgen as m
from pybind11_tests import stl as test_stl
@pytest.mark.parametrize( @pytest.mark.parametrize(
@ -62,6 +63,14 @@ from pybind11_tests import cases_for_stubgen as m
m.MapUserTypeFloat.__iter__.__doc__, m.MapUserTypeFloat.__iter__.__doc__,
'__iter__(self: pybind11_tests.cases_for_stubgen.MapUserTypeFloat) -> Iterator[tuple[Annotated[Any, "test_cases_for_stubgen::user_type"], float]]\n', '__iter__(self: pybind11_tests.cases_for_stubgen.MapUserTypeFloat) -> Iterator[tuple[Annotated[Any, "test_cases_for_stubgen::user_type"], float]]\n',
), ),
(
test_stl.cast_array.__doc__,
"cast_array() -> Annotated[list[int], FixedSize(2)]\n",
),
(
test_stl.load_array.__doc__,
"load_array(arg0: Annotated[list[int], FixedSize(2)]) -> bool\n",
),
], ],
) )
def test_docstring(docstring, expected): def test_docstring(docstring, expected):