Skip to content

Commit 92b3e36

Browse files
committed
(fix): Do not truncate views
1 parent df6eee0 commit 92b3e36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def pytest_generate_tests(metafunc):
2727
@pytest.fixture(autouse=True)
2828
def cleanup_after_test():
2929
yield
30-
tables = DB().fetch_all("SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'")
30+
tables = DB().fetch_all("SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type != 'VIEW'")
3131
for table in tables:
3232
table_name = table[0]
3333
DB().query(f'TRUNCATE TABLE "{table_name}" RESTART IDENTITY CASCADE')

0 commit comments

Comments
 (0)