Page MenuHomeSoftware Heritage

D2091.id.diff
No OneTemporary

D2091.id.diff

diff --git a/swh/storage/tests/test_storage.py b/swh/storage/tests/test_storage.py
--- a/swh/storage/tests/test_storage.py
+++ b/swh/storage/tests/test_storage.py
@@ -22,34 +22,11 @@
from swh.model import from_disk, identifiers
from swh.model.hashutil import hash_to_bytes
from swh.model.hypothesis_strategies import objects
-from swh.storage.tests.storage_testing import StorageTestFixture
from swh.storage import HashCollision
from .storage_data import data
-@pytest.mark.db
-class StorageTestDbFixture(StorageTestFixture):
- def setUp(self):
- super().setUp()
- self.maxDiff = None
-
- def tearDown(self):
- self.reset_storage()
- if hasattr(self.storage, '_pool') and self.storage._pool:
- self.storage._pool.closeall()
- super().tearDown()
-
- def get_db(self):
- return self.storage.db()
-
- @contextmanager
- def db_transaction(self):
- with self.get_db() as db:
- with db.transaction() as cur:
- yield db, cur
-
-
@contextmanager
def db_transaction(storage):
with storage.db() as db:

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 30, 2:47 PM (7 h, 37 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3220001

Event Timeline