Fix detail::obj_class_name() to work correctly for meta classes. (#4436)

* Fix `detail::obj_class_name()` to work correctly for meta classes.

* Adjust expected name for PyPy
This commit is contained in:
Ralf W. Grosse-Kunstleve
2023-01-02 03:46:17 -08:00
committed by GitHub
parent 60f02f5f66
commit f12e098f1d
5 changed files with 21 additions and 2 deletions

View File

@@ -99,6 +99,8 @@ void m_defs(py::module_ &m) {
} // namespace handle_from_move_only_type_with_operator_PyObject
TEST_SUBMODULE(pytypes, m) {
m.def("obj_class_name", [](py::handle obj) { return py::detail::obj_class_name(obj.ptr()); });
handle_from_move_only_type_with_operator_PyObject::m_defs(m);
// test_bool