summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Cope <olly@ollycope.com>2022-10-29 16:29:27 +0000
committerOlly Cope <olly@ollycope.com>2022-10-29 16:29:27 +0000
commit236b839acc6c7a20cb30cd84985f3ece725a6939 (patch)
tree36726427f4efc49db887311a306e33a99094b6f1
parentf525da0cb39c374ce4f7b6f4bf272821b9ed3e48 (diff)
downloadyoyo-236b839acc6c7a20cb30cd84985f3ece725a6939.tar.gz
tests: refactor conftest table dropping code
-rw-r--r--yoyo/tests/conftest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yoyo/tests/conftest.py b/yoyo/tests/conftest.py
index 1bf8d4a..f24509d 100644
--- a/yoyo/tests/conftest.py
+++ b/yoyo/tests/conftest.py
@@ -56,9 +56,9 @@ def drop_all_tables(backend):
def drop_yoyo_tables(backend):
- for table in backend.list_tables():
- if table.startswith("yoyo") or table.startswith("_yoyo"):
- with backend.transaction():
+ with backend.transaction():
+ for table in backend.list_tables():
+ if table.startswith("yoyo") or table.startswith("_yoyo"):
backend.execute("DROP TABLE {}".format(table))