Ejemplo n.º 1
0
 def tearDown(self):
     try:
         self.database.close()
     except LoopExit:  # pragma: no cover
         # This has been seen on CI, probably as the result of
         # some other exception. Don't let it halt the teardown.
         traceback.print_exc()
     self.blob_storage.close()
     self._timer.testTearDown()
     tearDown(self)
     super(TestBlobMixin, self).tearDown()
Ejemplo n.º 2
0
 def setUp(self):
     super(TestBlobMixin, self).setUp()
     setUp(self)
     self._timer = MonotonicallyIncreasingTimeLayerMixin()
     self._timer.testSetUp()
     try:
         self.blob_storage = self.create_storage(
             **self.DEFAULT_BLOB_STORAGE_KWARGS)
     except:  # pragma: no cover
         # If setUp() raises an exception, tearDown is never called.
         # That's bad: ZODB.tests.util.setUp() changes directories and
         # monkeys with the contents of the stdlib tempfile.
         tearDown(self)
         raise
     self.database = DB(self.blob_storage)
Ejemplo n.º 3
0
def timeIncreasesTearDown(test):
    test.globs['time_layer'].testTearDown()
    util.tearDown(test)
Ejemplo n.º 4
0
 def tearDown(self):
     self.database.close()
     self.blob_storage.close()
     self._timer.testTearDown()
     tearDown(self)
     super(TestBlobMixin, self).tearDown()
Ejemplo n.º 5
0
 def tearDown(self):
     transaction.abort() # just in case
     self.conn.close()
     self.db.close()
     util.tearDown(self)
Ejemplo n.º 6
0
def timeIncreasesTearDown(test):
    test.globs['time_layer'].testTearDown()
    util.tearDown(test)
Ejemplo n.º 7
0
 def tearDown(self):
     util.tearDown(self)
     transaction.abort() # just in case