aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-09 16:15:52 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-09 16:15:52 +0200
commit9d7c24e8826804c4d2421964bbc06ab9ed35fea2 (patch)
tree7f6896a13d208b407e3a451ce1df8bc5482518bb
parentsqlite: SQL formatting (diff)
downloadcimple-9d7c24e8826804c4d2421964bbc06ab9ed35fea2.tar.gz
cimple-9d7c24e8826804c4d2421964bbc06ab9ed35fea2.zip
test: fix sqlite3.connect usage
-rw-r--r--test/py/lib/db.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/py/lib/db.py b/test/py/lib/db.py
index b9059c5..9fddbf5 100644
--- a/test/py/lib/db.py
+++ b/test/py/lib/db.py
@@ -4,12 +4,14 @@
# Distributed under the MIT License.
from contextlib import closing, contextmanager
+import logging
import sqlite3
class Database:
def __init__(self, path):
- self.conn = sqlite3.connect(f'file:{path}?mode=ro')
+ logging.info('Opening SQLite database: %s', path)
+ self.conn = sqlite3.connect(f'file:{path}?mode=ro', uri=True)
def __enter__(self):
return self