mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 14:59:27 +00:00
fix: type bug intruduced in #2492
This now tests the old form too, and fixes the bug introduced.
This commit is contained in:
committed by
Henry Schreiner
parent
dec33c29f2
commit
11f756f5a9
@@ -45,6 +45,12 @@ def test_type_of_py():
|
||||
assert m.get_type_of(int) == type
|
||||
|
||||
|
||||
def test_type_of_classic():
|
||||
assert m.get_type_classic(1) == int
|
||||
assert m.get_type_classic(m.DerivedClass1()) == m.DerivedClass1
|
||||
assert m.get_type_classic(int) == type
|
||||
|
||||
|
||||
def test_type_of_py_nodelete():
|
||||
# If the above test deleted the class, this will segfault
|
||||
assert m.get_type_of(m.DerivedClass1()) == m.DerivedClass1
|
||||
|
||||
Reference in New Issue
Block a user