diff --git a/tests/test_wip.cpp b/tests/test_wip.cpp index 3961bfdd5..04891a55e 100644 --- a/tests/test_wip.cpp +++ b/tests/test_wip.cpp @@ -1,3 +1,17 @@ #include "pybind11_tests.h" -TEST_SUBMODULE(wip, m) { m.attr("__doc__") = "WIP"; } +namespace pybind11_tests { +namespace wip { + +struct SomeType {}; + +} // namespace wip +} // namespace pybind11_tests + +TEST_SUBMODULE(wip, m) { + m.attr("__doc__") = "WIP"; + + using namespace pybind11_tests::wip; + + py::class_(m, "SomeType").def(py::init<>()); +} diff --git a/tests/test_wip.py b/tests/test_wip.py index 438b37202..3076c6fc7 100644 --- a/tests/test_wip.py +++ b/tests/test_wip.py @@ -5,3 +5,8 @@ from pybind11_tests import wip as m def test_doc(): assert m.__doc__ == "WIP" + + +def test_some_type_ctor(): + obj = m.SomeType() + assert isinstance(obj, m.SomeType)