- CPPUNIT_ASSERT(pyVal);
- CPPUNIT_ASSERT(PyFloat_Check(pyVal));
- CPPUNIT_ASSERT_DOUBLES_EQUAL(42., PyFloat_AsDouble(pyVal), 1.E-12);
+ {
+ AutoGIL agil;
+ CPPUNIT_ASSERT(pyVal);
+ x = PyFloat_AsDouble(pyVal);
+ CPPUNIT_ASSERT( PyErr_Occurred()==nullptr );// check pyVal is interpretable as float
+ }
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(42., x, 1.E-12);
+ p->shutdown(10); // kill all the containers