From 0fb6a9cfb0038c4344d125610efeae5f742e0e73 Mon Sep 17 00:00:00 2001 From: Christopher Bartz Date: Mon, 29 Apr 2024 10:01:03 +0200 Subject: [PATCH] fix placement of no cover directive --- repo_policy_compliance/database.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/repo_policy_compliance/database.py b/repo_policy_compliance/database.py index db10bb67..c548e2d9 100644 --- a/repo_policy_compliance/database.py +++ b/repo_policy_compliance/database.py @@ -32,9 +32,8 @@ class OneTimeToken(Base): db_connect_str = os.getenv("POSTGRESQL_DB_CONNECT_STRING") engine: sa.Engine -if db_connect_str: - # this line is only covered by charm integration test which is not part of the coverage report - # pragma: no cover +# postgresql is only covered by charm integration test, which is not part of the coverage report +if db_connect_str: # pragma: no cover engine = create_engine(db_connect_str) else: # Using sqlite means that this app can only be used with a single worker.