mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 08:32:02 +00:00
Add py::class_<SomeType>
with default ctor.
This commit is contained in:
parent
ced85c95b1
commit
e5907480f5
@ -1,3 +1,17 @@
|
||||
#include "pybind11_tests.h"
|
||||
|
||||
TEST_SUBMODULE(wip, m) { m.attr("__doc__") = "WIP"; }
|
||||
namespace pybind11_tests {
|
||||
namespace wip {
|
||||
|
||||
struct SomeType {};
|
||||
|
||||
} // namespace wip
|
||||
} // namespace pybind11_tests
|
||||
|
||||
TEST_SUBMODULE(wip, m) {
|
||||
m.attr("__doc__") = "WIP";
|
||||
|
||||
using namespace pybind11_tests::wip;
|
||||
|
||||
py::class_<SomeType>(m, "SomeType").def(py::init<>());
|
||||
}
|
||||
|
@ -5,3 +5,8 @@ from pybind11_tests import wip as m
|
||||
|
||||
def test_doc():
|
||||
assert m.__doc__ == "WIP"
|
||||
|
||||
|
||||
def test_some_type_ctor():
|
||||
obj = m.SomeType()
|
||||
assert isinstance(obj, m.SomeType)
|
||||
|
Loading…
Reference in New Issue
Block a user