def release(self):
self._lock.release()
- def close(self, force=False):
- if force:
- super(TestCursor, self).close()
- elif not self._closed:
+ def force_close(self):
+ super(TestCursor, self).close()
+
+ def close(self):
+ if not self._closed:
self.rollback() # for stuff that has not been committed
- self.release()
+ self.release()
def autocommit(self, on):
_logger.debug("TestCursor.autocommit(%r) does nothing", on)
def test_cursor(self, serialized=True):
cursor_type = serialized and 'serialized ' or ''
_logger.debug('create test %scursor to %r', cursor_type, self.dbname)
- return TestCursor(self._pool, self.dbname, serialized=serialized)
+ return TestCursor(self.__pool, self.dbname, serialized=serialized)
# serialized_cursor is deprecated - cursors are serialized by default
serialized_cursor = cursor