def __exit__(self, exc_type, exc_value, tb): set_is_malloc_allowed(False) return False # let the exceptions fall through
def tearDown(self): set_is_malloc_allowed(True)
def __enter__(self): set_is_malloc_allowed(True) return self
def setUp(self): # assure that no heap memory allocation in Eigen happens during this test class set_is_malloc_allowed(False)