commit | 11f756f5a9504b003883ae243ec34276222c7c3e | [log] [tgz] |
---|---|---|
author | Henry Fredrick Schreiner <henry.fredrick.schreiner@cern.ch> | Wed Sep 16 22:02:09 2020 -0400 |
committer | Henry Schreiner <HenrySchreinerIII@gmail.com> | Wed Sep 16 23:21:47 2020 -0400 |
tree | 4804a50f4d829b968e0efd76adc704045d32d360 | |
parent | dec33c29f228b2b9bb931f4cf93520780d961fe4 [diff] [blame] |
fix: type bug intruduced in #2492 This now tests the old form too, and fixes the bug introduced.
diff --git a/tests/test_class.cpp b/tests/test_class.cpp index b0e3d3a..bb9d364 100644 --- a/tests/test_class.cpp +++ b/tests/test_class.cpp
@@ -152,6 +152,10 @@ return py::type::of(ob); }); + m.def("get_type_classic", [](py::handle h) { + return h.get_type(); + }); + m.def("as_type", [](py::object ob) { auto tp = py::type(ob); if (py::isinstance<py::type>(ob))