Commit 2d14c1c5 by Jason Rhinelander

Fixed bad_arg_def imports

Don't try to define these in the issues submodule, because that fails
if testing without issues compiled in (e.g. using
cmake -DPYBIND11_TEST_OVERRIDE=test_methods_and_attributes.cpp).
parent 02ffbf16
......@@ -299,11 +299,11 @@ test_initializer methods_and_attributes([](py::module &m) {
m.attr("debug_enabled") = false;
#endif
m.def("bad_arg_def_named", []{
auto m = py::module::import("pybind11_tests.issues");
auto m = py::module::import("pybind11_tests");
m.def("should_fail", [](int, NotRegistered) {}, py::arg(), py::arg("a") = NotRegistered());
});
m.def("bad_arg_def_unnamed", []{
auto m = py::module::import("pybind11_tests.issues");
auto m = py::module::import("pybind11_tests");
m.def("should_fail", [](int, NotRegistered) {}, py::arg(), py::arg() = NotRegistered());
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment