diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-09 16:15:52 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-09 16:15:52 +0200 |
commit | 9d7c24e8826804c4d2421964bbc06ab9ed35fea2 (patch) | |
tree | 7f6896a13d208b407e3a451ce1df8bc5482518bb /test/py/lib | |
parent | sqlite: SQL formatting (diff) | |
download | cimple-9d7c24e8826804c4d2421964bbc06ab9ed35fea2.tar.gz cimple-9d7c24e8826804c4d2421964bbc06ab9ed35fea2.zip |
test: fix sqlite3.connect usage
Diffstat (limited to '')
-rw-r--r-- | test/py/lib/db.py | 4 |
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 |