From b4d0483de7b536a3a423d95412053acb12946498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthijs=20Gr=C3=BCnbauer?= Date: Tue, 3 Sep 2024 13:09:06 +0200 Subject: [PATCH] Only clean psql db when using psql --- python/lib/adaguc/AdagucTestTools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/lib/adaguc/AdagucTestTools.py b/python/lib/adaguc/AdagucTestTools.py index 6cb6ca2a..8fc7622c 100644 --- a/python/lib/adaguc/AdagucTestTools.py +++ b/python/lib/adaguc/AdagucTestTools.py @@ -149,7 +149,8 @@ def cleanPostgres(self): Some tests fail when using postgres if there is already data present in the database. Running the test separately works.""" - if adaguc_db := os.getenv("ADAGUC_DB", None): + adaguc_db = os.getenv("ADAGUC_DB", None) + if adaguc_db and not adaguc_db.endswith(".db"): subprocess.run( [ "psql",