Add schema_version on python side, with match test
This commit is contained in:
parent
cbb8180ff3
commit
10f5fac0e7
@ -3,6 +3,9 @@ import os
|
||||
import sqlite3
|
||||
|
||||
|
||||
schema_version = 2
|
||||
|
||||
|
||||
def init(path):
|
||||
"""
|
||||
Initialize a data store directory.
|
||||
|
||||
8
tests/test_db.py
Normal file
8
tests/test_db.py
Normal file
@ -0,0 +1,8 @@
|
||||
def test_schema_version_match():
|
||||
import nancy
|
||||
from nancy.version import schema_version
|
||||
|
||||
cur = nancy._conn.cursor()
|
||||
(db_schema_ver,) = cur.execute("PRAGMA user_version;").fetchone()
|
||||
|
||||
assert schema_version == db_schema_ver
|
||||
Loading…
x
Reference in New Issue
Block a user