diff --git a/tests/classh_module_local_0.cpp b/tests/class_sh_module_local_0.cpp similarity index 60% rename from tests/classh_module_local_0.cpp rename to tests/class_sh_module_local_0.cpp index c52cce8ab..8e007fd0e 100644 --- a/tests/classh_module_local_0.cpp +++ b/tests/class_sh_module_local_0.cpp @@ -4,7 +4,7 @@ #include namespace pybind11_tests { -namespace classh_module_local { +namespace class_sh_module_local { struct atyp { // Short for "any type". std::string mtxt; @@ -14,13 +14,13 @@ std::string get_mtxt(const atyp &obj) { return obj.mtxt; } atyp rtrn_valu_atyp() { return atyp(); } -} // namespace classh_module_local +} // namespace class_sh_module_local } // namespace pybind11_tests -PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::classh_module_local::atyp) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_module_local::atyp) -PYBIND11_MODULE(classh_module_local_0, m) { - using namespace pybind11_tests::classh_module_local; +PYBIND11_MODULE(class_sh_module_local_0, m) { + using namespace pybind11_tests::class_sh_module_local; m.def("get_mtxt", get_mtxt); diff --git a/tests/classh_module_local_1.cpp b/tests/class_sh_module_local_1.cpp similarity index 64% rename from tests/classh_module_local_1.cpp rename to tests/class_sh_module_local_1.cpp index 8efa4a87a..22adb733d 100644 --- a/tests/classh_module_local_1.cpp +++ b/tests/class_sh_module_local_1.cpp @@ -1,11 +1,11 @@ -// Identical to classh_module_local_2.cpp, except 2 replaced with 1. +// Identical to class_sh_module_local_2.cpp, except 2 replaced with 1. #include #include #include namespace pybind11_tests { -namespace classh_module_local { +namespace class_sh_module_local { struct atyp { // Short for "any type". std::string mtxt; @@ -13,14 +13,14 @@ struct atyp { // Short for "any type". std::string get_mtxt(const atyp &obj) { return obj.mtxt; } -} // namespace classh_module_local +} // namespace class_sh_module_local } // namespace pybind11_tests -PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::classh_module_local::atyp) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_module_local::atyp) -PYBIND11_MODULE(classh_module_local_1, m) { +PYBIND11_MODULE(class_sh_module_local_1, m) { namespace py = pybind11; - using namespace pybind11_tests::classh_module_local; + using namespace pybind11_tests::class_sh_module_local; py::class_(m, "atyp", py::module_local()) .def(py::init([](const std::string &mtxt) { diff --git a/tests/classh_module_local_2.cpp b/tests/class_sh_module_local_2.cpp similarity index 64% rename from tests/classh_module_local_2.cpp rename to tests/class_sh_module_local_2.cpp index a6531ef41..e6f866267 100644 --- a/tests/classh_module_local_2.cpp +++ b/tests/class_sh_module_local_2.cpp @@ -1,11 +1,11 @@ -// Identical to classh_module_local_1.cpp, except 1 replaced with 2. +// Identical to class_sh_module_local_1.cpp, except 1 replaced with 2. #include #include #include namespace pybind11_tests { -namespace classh_module_local { +namespace class_sh_module_local { struct atyp { // Short for "any type". std::string mtxt; @@ -13,14 +13,14 @@ struct atyp { // Short for "any type". std::string get_mtxt(const atyp &obj) { return obj.mtxt; } -} // namespace classh_module_local +} // namespace class_sh_module_local } // namespace pybind11_tests -PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::classh_module_local::atyp) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_module_local::atyp) -PYBIND11_MODULE(classh_module_local_2, m) { +PYBIND11_MODULE(class_sh_module_local_2, m) { namespace py = pybind11; - using namespace pybind11_tests::classh_module_local; + using namespace pybind11_tests::class_sh_module_local; py::class_(m, "atyp", py::module_local()) .def(py::init([](const std::string &mtxt) { diff --git a/tests/test_classh_wip.cpp b/tests/test_class_sh_basic.cpp similarity index 94% rename from tests/test_classh_wip.cpp rename to tests/test_class_sh_basic.cpp index ae4a6f06b..488b033fc 100644 --- a/tests/test_classh_wip.cpp +++ b/tests/test_class_sh_basic.cpp @@ -6,7 +6,7 @@ #include namespace pybind11_tests { -namespace classh_wip { +namespace class_sh_basic { struct atyp { // Short for "any type". std::string mtxt; @@ -46,15 +46,15 @@ std::string pass_uqcp_atyp(std::unique_ptr obj) { return "pass_uqcp: std::string get_mtxt(atyp const &obj) { return obj.mtxt; } std::unique_ptr unique_ptr_roundtrip(std::unique_ptr obj) { return obj; } -} // namespace classh_wip +} // namespace class_sh_basic } // namespace pybind11_tests -PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::classh_wip::atyp) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_basic::atyp) namespace pybind11_tests { -namespace classh_wip { +namespace class_sh_basic { -TEST_SUBMODULE(classh_wip, m) { +TEST_SUBMODULE(class_sh_basic, m) { namespace py = pybind11; py::class_(m, "atyp") @@ -97,5 +97,5 @@ TEST_SUBMODULE(classh_wip, m) { m.def("unique_ptr_roundtrip", unique_ptr_roundtrip); // pass_uqmp_atyp, rtrn_uqmp_atyp } -} // namespace classh_wip +} // namespace class_sh_basic } // namespace pybind11_tests diff --git a/tests/test_classh_wip.py b/tests/test_class_sh_basic.py similarity index 98% rename from tests/test_classh_wip.py rename to tests/test_class_sh_basic.py index b6f86d2bf..21a93b5dc 100644 --- a/tests/test_classh_wip.py +++ b/tests/test_class_sh_basic.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import pytest -from pybind11_tests import classh_wip as m +from pybind11_tests import class_sh_basic as m def test_atyp_constructors(): diff --git a/tests/test_classh_inheritance.cpp b/tests/test_class_sh_inheritance.cpp similarity index 83% rename from tests/test_classh_inheritance.cpp rename to tests/test_class_sh_inheritance.cpp index b6d7fc0b0..81049061f 100644 --- a/tests/test_classh_inheritance.cpp +++ b/tests/test_class_sh_inheritance.cpp @@ -5,7 +5,7 @@ #include namespace pybind11_tests { -namespace classh_inheritance { +namespace class_sh_inheritance { template struct base_template { @@ -53,20 +53,20 @@ inline int pass_cptr_base2(base2 const *b) { return b->id() + 22; } inline int pass_cptr_drvd2(drvd2 const *d) { return d->id() + 23; } // clang-format on -} // namespace classh_inheritance +} // namespace class_sh_inheritance } // namespace pybind11_tests -PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::classh_inheritance::base) -PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::classh_inheritance::drvd) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_inheritance::base) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_inheritance::drvd) -PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::classh_inheritance::base1) -PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::classh_inheritance::base2) -PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::classh_inheritance::drvd2) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_inheritance::base1) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_inheritance::base2) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_inheritance::drvd2) namespace pybind11_tests { -namespace classh_inheritance { +namespace class_sh_inheritance { -TEST_SUBMODULE(classh_inheritance, m) { +TEST_SUBMODULE(class_sh_inheritance, m) { py::class_(m, "base"); py::class_(m, "drvd"); @@ -95,5 +95,5 @@ TEST_SUBMODULE(classh_inheritance, m) { m.def("pass_cptr_drvd2", pass_cptr_drvd2); } -} // namespace classh_inheritance +} // namespace class_sh_inheritance } // namespace pybind11_tests diff --git a/tests/test_classh_inheritance.py b/tests/test_class_sh_inheritance.py similarity index 96% rename from tests/test_classh_inheritance.py rename to tests/test_class_sh_inheritance.py index cf72c5bc4..69f9131d7 100644 --- a/tests/test_classh_inheritance.py +++ b/tests/test_class_sh_inheritance.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from pybind11_tests import classh_inheritance as m +from pybind11_tests import class_sh_inheritance as m def test_rtrn_mptr_drvd_pass_cptr_base(): diff --git a/tests/test_classh_module_local.py b/tests/test_class_sh_module_local.py similarity index 84% rename from tests/test_classh_module_local.py rename to tests/test_class_sh_module_local.py index f7113efe5..aa4d1f3c5 100644 --- a/tests/test_classh_module_local.py +++ b/tests/test_class_sh_module_local.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- import pytest -import classh_module_local_0 as m0 -import classh_module_local_1 as m1 -import classh_module_local_2 as m2 +import class_sh_module_local_0 as m0 +import class_sh_module_local_1 as m1 +import class_sh_module_local_2 as m2 def test_cross_module_get_mtxt(): diff --git a/tests/test_unique_ptr_member.cpp b/tests/test_class_sh_unique_ptr_member.cpp similarity index 83% rename from tests/test_unique_ptr_member.cpp rename to tests/test_class_sh_unique_ptr_member.cpp index a9484c0fc..0da05f4e3 100644 --- a/tests/test_unique_ptr_member.cpp +++ b/tests/test_class_sh_unique_ptr_member.cpp @@ -5,7 +5,7 @@ #include namespace pybind11_tests { -namespace unique_ptr_member { +namespace class_sh_unique_ptr_member { class pointee { // NOT copyable. public: @@ -37,15 +37,15 @@ private: std::unique_ptr ptr_; }; -} // namespace unique_ptr_member +} // namespace class_sh_unique_ptr_member } // namespace pybind11_tests -PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::unique_ptr_member::pointee) +PYBIND11_SMART_HOLDER_TYPE_CASTERS(pybind11_tests::class_sh_unique_ptr_member::pointee) namespace pybind11_tests { -namespace unique_ptr_member { +namespace class_sh_unique_ptr_member { -TEST_SUBMODULE(unique_ptr_member, m) { +TEST_SUBMODULE(class_sh_unique_ptr_member, m) { py::class_(m, "pointee") .def(py::init<>()) .def("get_int", &pointee::get_int); @@ -59,5 +59,5 @@ TEST_SUBMODULE(unique_ptr_member, m) { .def("give_up_ownership_via_shared_ptr", &ptr_owner::give_up_ownership_via_shared_ptr); } -} // namespace unique_ptr_member +} // namespace class_sh_unique_ptr_member } // namespace pybind11_tests diff --git a/tests/test_unique_ptr_member.py b/tests/test_class_sh_unique_ptr_member.py similarity index 93% rename from tests/test_unique_ptr_member.py rename to tests/test_class_sh_unique_ptr_member.py index 5ced1b3ae..5537ac7a9 100644 --- a/tests/test_unique_ptr_member.py +++ b/tests/test_class_sh_unique_ptr_member.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import pytest -from pybind11_tests import unique_ptr_member as m +from pybind11_tests import class_sh_unique_ptr_member as m def test_make_unique_pointee():