diff --git a/tests/test_cases_for_stubgen.py b/tests/test_cases_for_stubgen.py index f314039e3..f5c069304 100644 --- a/tests/test_cases_for_stubgen.py +++ b/tests/test_cases_for_stubgen.py @@ -96,4 +96,6 @@ from pybind11_tests import cases_for_stubgen as m ], ) def test_docstring(docstring, expected): + # On some platforms the stl_binders module name prevails for KeysView, ValuesView, ItemsView. + docstring = docstring.replace(".stl_binders.", ".cases_for_stubgen.") assert docstring == expected