mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-27 09:46:27 +02:00
Redact version from info table snapshot to avoid test failures on version bumps
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
41cecbadc3
commit
380b0bb032
2 changed files with 6 additions and 18 deletions
|
|
@ -1,24 +1,8 @@
|
||||||
# serializer version: 1
|
# serializer version: 1
|
||||||
# name: test_info_table_contents
|
# name: test_info_table_contents
|
||||||
OrderedDict({
|
OrderedDict({
|
||||||
'sql': 'select key, value from v_info order by key',
|
'sql': "select key, value from v_info where key not like 'CREATE_VERSION%' order by key",
|
||||||
'rows': list([
|
'rows': list([
|
||||||
OrderedDict({
|
|
||||||
'key': 'CREATE_VERSION',
|
|
||||||
'value': 'v0.1.7-alpha.10',
|
|
||||||
}),
|
|
||||||
OrderedDict({
|
|
||||||
'key': 'CREATE_VERSION_MAJOR',
|
|
||||||
'value': 0,
|
|
||||||
}),
|
|
||||||
OrderedDict({
|
|
||||||
'key': 'CREATE_VERSION_MINOR',
|
|
||||||
'value': 1,
|
|
||||||
}),
|
|
||||||
OrderedDict({
|
|
||||||
'key': 'CREATE_VERSION_PATCH',
|
|
||||||
'value': 7,
|
|
||||||
}),
|
|
||||||
]),
|
]),
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,11 @@ def test_insert_validates_type(db):
|
||||||
|
|
||||||
def test_info_table_contents(db, snapshot):
|
def test_info_table_contents(db, snapshot):
|
||||||
db.execute("create virtual table v using vec0(emb float[4], chunk_size=8)")
|
db.execute("create virtual table v using vec0(emb float[4], chunk_size=8)")
|
||||||
assert exec(db, "select key, value from v_info order by key") == snapshot()
|
assert exec(db, "select key, value from v_info where key not like 'CREATE_VERSION%' order by key") == snapshot()
|
||||||
|
# Smoke-check that version keys exist without pinning exact values
|
||||||
|
version_rows = exec(db, "select key from v_info where key like 'CREATE_VERSION%' order by key")
|
||||||
|
keys = [r["key"] for r in version_rows["rows"]]
|
||||||
|
assert keys == ["CREATE_VERSION", "CREATE_VERSION_MAJOR", "CREATE_VERSION_MINOR", "CREATE_VERSION_PATCH"]
|
||||||
|
|
||||||
|
|
||||||
def test_delete_zeroes_rowid_blob(db):
|
def test_delete_zeroes_rowid_blob(db):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue