#define BOOST_TEST_MODULE boost_python_gil #define BOOST_TEST_DYN_LINK #include #include "gil.hpp" BOOST_AUTO_TEST_SUITE(BOOST_TEST_MODULE) BOOST_AUTO_TEST_CASE(test1) { { // test building a guard without Python threads initialized // this isn't a common thing to do, but we do support it "just in case" boost::python::gil_guard_release release1; } { Py_InitializeEx(false); boost::python::gil_guard_release release2; boost::python::gil_guard_release release3; // should do nothing boost::python::gil_guard_acquire acquire1; // re-acquires the lock boost::python::gil_guard_acquire acquire2; // should do nothing } } BOOST_AUTO_TEST_SUITE_END()