From 4e67b9fea3bcf0ec8b6073dc02f831e85ec16608 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sat, 21 May 2022 08:33:57 -0700 Subject: [PATCH] Experiment: pybind11_tests INTENTIONAL BREAKAGE --- tests/pybind11_tests.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/pybind11_tests.cpp b/tests/pybind11_tests.cpp index 3c04699157..1162099ce4 100644 --- a/tests/pybind11_tests.cpp +++ b/tests/pybind11_tests.cpp @@ -65,6 +65,11 @@ void bind_ConstructorStats(py::module_ &m) { PYBIND11_MODULE(pybind11_tests, m) { m.doc() = "pybind11 test module"; + if (m) { // Always true. + PyErr_SetString(PyExc_ValueError, "pybind11_tests INTENTIONAL BREAKAGE"); + throw py::error_already_set(); + } + bind_ConstructorStats(m); #if defined(PYBIND11_DETAILED_ERROR_MESSAGES)