diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6ad729aae7..897fb665c1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -149,7 +149,7 @@ set(PYBIND11_TEST_FILES test_sequences_and_iterators test_smart_ptr test_stl - test_stl_binders + test_stl_binders.py test_tagbased_polymorphic test_thread test_type_caster_pyobject_ptr @@ -220,6 +220,7 @@ tests_extra_targets("test_exceptions.py;test_local_bindings.py;test_stl.py;test_ # And add additional targets for other tests. tests_extra_targets("test_exceptions.py" "cross_module_interleaved_error_already_set") tests_extra_targets("test_gil_scoped.py" "cross_module_gil_utils") +tests_extra_targets("test_stl_binders.py" "stl_binders") set(PYBIND11_EIGEN_REPO "https://gitlab.com/libeigen/eigen.git" diff --git a/tests/test_stl_binders.cpp b/tests/stl_binders.cpp similarity index 99% rename from tests/test_stl_binders.cpp rename to tests/stl_binders.cpp index e52a03b6d2..39f142b0b3 100644 --- a/tests/test_stl_binders.cpp +++ b/tests/stl_binders.cpp @@ -10,13 +10,13 @@ #include #include -#include "pybind11_tests.h" - #include #include #include #include +namespace py = pybind11; + class El { public: El() = delete; @@ -174,7 +174,7 @@ struct recursive_container_traits { } // namespace detail } // namespace pybind11 -TEST_SUBMODULE(stl_binders, m) { +PYBIND11_MODULE(stl_binders, m) { // test_vector_int py::bind_vector>(m, "VectorInt", py::buffer_protocol()); diff --git a/tests/test_stl_binders.py b/tests/test_stl_binders.py index c00d45b926..9c8e89f8a7 100644 --- a/tests/test_stl_binders.py +++ b/tests/test_stl_binders.py @@ -1,6 +1,5 @@ import pytest - -from pybind11_tests import stl_binders as m +import stl_binders as m def test_vector_int():