mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
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:
committed by
GitHub
parent
60f02f5f66
commit
f12e098f1d
@@ -9,6 +9,12 @@ from pybind11_tests import detailed_error_messages_enabled
|
||||
from pybind11_tests import pytypes as m
|
||||
|
||||
|
||||
def test_obj_class_name():
|
||||
assert m.obj_class_name(None) == "NoneType"
|
||||
assert m.obj_class_name(list) == "list"
|
||||
assert m.obj_class_name([]) == "list"
|
||||
|
||||
|
||||
def test_handle_from_move_only_type_with_operator_PyObject(): # noqa: N802
|
||||
assert m.handle_from_move_only_type_with_operator_PyObject_ncnst()
|
||||
assert m.handle_from_move_only_type_with_operator_PyObject_const()
|
||||
|
||||
Reference in New Issue
Block a user