From 8fe75ff85bdff1cafdbc68ad0d086bbea6fae990 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 30 Jun 2024 11:37:01 -0700 Subject: [PATCH] Remove all (3) BAKEIN_BREAK from test_factory_constructors.cpp and all (4) BAKEIN_BREAK from test_factory_constructors.py (test_factory_constructors builds and runs successfully). --- tests/test_factory_constructors.cpp | 6 ------ tests/test_factory_constructors.py | 4 ---- 2 files changed, 10 deletions(-) diff --git a/tests/test_factory_constructors.cpp b/tests/test_factory_constructors.cpp index 323d24cf8..a387cd2e7 100644 --- a/tests/test_factory_constructors.cpp +++ b/tests/test_factory_constructors.cpp @@ -228,20 +228,14 @@ TEST_SUBMODULE(factory_constructors, m) { // test_init_factory_basic, test_bad_type py::class_(m, "TestFactory1") -#ifdef BAKEIN_BREAK .def(py::init([](unique_ptr_tag, int v) { return TestFactoryHelper::construct1(v); })) -#endif .def(py::init(&TestFactoryHelper::construct1_string)) // raw function pointer .def(py::init([](pointer_tag) { return TestFactoryHelper::construct1(); })) -#ifdef BAKEIN_BREAK .def(py::init( [](py::handle, int v, py::handle) { return TestFactoryHelper::construct1(v); })) -#endif .def_readwrite("value", &TestFactory1::value); py::class_(m, "TestFactory2") -#ifdef BAKEIN_BREAK .def(py::init([](pointer_tag, int v) { return TestFactoryHelper::construct2(v); })) -#endif .def(py::init([](unique_ptr_tag, std::string v) { return TestFactoryHelper::construct2(std::move(v)); })) diff --git a/tests/test_factory_constructors.py b/tests/test_factory_constructors.py index b2938f86e..0ddad5e32 100644 --- a/tests/test_factory_constructors.py +++ b/tests/test_factory_constructors.py @@ -19,7 +19,6 @@ def test_init_factory_basic(): cstats[0].alive() # force gc n_inst = ConstructorStats.detail_reg_inst() - pytest.skip("BAKEIN_BREAK: TypeError") x1 = m.TestFactory1(tag.unique_ptr, 3) assert x1.value == "3" y1 = m.TestFactory1(tag.pointer) @@ -73,7 +72,6 @@ def test_init_factory_basic(): def test_init_factory_signature(msg): with pytest.raises(TypeError) as excinfo: m.TestFactory1("invalid", "constructor", "arguments") - pytest.skip("BAKEIN_BREAK: AssertionError") assert ( msg(excinfo.value) == """ @@ -336,7 +334,6 @@ def test_multiple_inheritance(): m.TestFactory1.__init__(self, tag.unique_ptr, 33) m.TestFactory2.__init__(self, tag.move) - pytest.skip("BAKEIN_BREAK: TypeError") a = MITest() assert m.TestFactory1.value.fget(a) == "33" assert m.TestFactory2.value.fget(a) == "(empty2)" @@ -504,7 +501,6 @@ def test_invalid_self(): NotPybindDerived.__new__(NotPybindDerived), tag.alias, 1 ) - pytest.skip("BAKEIN_BREAK: AssertionError") for arg in (1, 2): with pytest.raises(TypeError) as excinfo: BrokenTF1(arg)