mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
Add make_some_type() to test_wip (reproduces Segmentation fault in test_class).
This commit is contained in:
parent
8fe75ff85b
commit
c6a917eeae
@ -16,4 +16,6 @@ TEST_SUBMODULE(wip, m) {
|
||||
py::class_<SomeType>(m, "SomeType").def(py::init([]() {
|
||||
return std::unique_ptr<SomeType>(new SomeType);
|
||||
}));
|
||||
|
||||
m.def("make_some_type", []() { return std::unique_ptr<SomeType>(new SomeType); });
|
||||
}
|
||||
|
@ -10,3 +10,8 @@ def test_doc():
|
||||
def test_some_type_ctor():
|
||||
obj = m.SomeType()
|
||||
assert isinstance(obj, m.SomeType)
|
||||
|
||||
|
||||
def test_make_some_type():
|
||||
obj = m.make_some_type()
|
||||
assert isinstance(obj, m.SomeType)
|
||||
|
Loading…
Reference in New Issue
Block a user