mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 22:52:01 +00:00
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).
This commit is contained in:
parent
02ffbf16fe
commit
2d14c1c5db
@ -299,11 +299,11 @@ test_initializer methods_and_attributes([](py::module &m) {
|
|||||||
m.attr("debug_enabled") = false;
|
m.attr("debug_enabled") = false;
|
||||||
#endif
|
#endif
|
||||||
m.def("bad_arg_def_named", []{
|
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("should_fail", [](int, NotRegistered) {}, py::arg(), py::arg("a") = NotRegistered());
|
||||||
});
|
});
|
||||||
m.def("bad_arg_def_unnamed", []{
|
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());
|
m.def("should_fail", [](int, NotRegistered) {}, py::arg(), py::arg() = NotRegistered());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user