Skip to content

Commit

Permalink
Upgrade to sqlite-utils 3.0, closes #30
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Dec 16, 2020
1 parent 2df1d5b commit 1561964
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_long_description():
"datasette": ["beta = dogsheep_beta"],
"console_scripts": ["dogsheep-beta = dogsheep_beta.cli:cli"],
},
install_requires=["datasette>=0.50.2", "click", "PyYAML", "sqlite-utils"],
install_requires=["datasette>=0.50.2", "click", "PyYAML", "sqlite-utils>=3.0"],
extras_require={
"test": ["pytest", "pytest-asyncio", "httpx", "beautifulsoup4", "html5lib"]
},
Expand Down
25 changes: 13 additions & 12 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,21 @@ def test_basic(tmp_path_factory, monkeypatch, use_porter):
assert indexes == [["is_public"], ["category"], ["timestamp"], ["type", "key"]]

# Test that search works, with porter stemming
results = beta_db["search_index"].search("run")
results = list(beta_db["search_index"].search("run"))
if use_porter:
assert results == [
(
"dogs.db/dogs",
"1",
"Cleo",
"2020-08-22 04:41:33",
1,
0,
"running",
None,
None,
)
{
"rowid": 1,
"type": "dogs.db/dogs",
"key": "1",
"title": "Cleo",
"timestamp": "2020-08-22 04:41:33",
"category": 1,
"is_public": 0,
"search_1": "running",
"search_2": None,
"search_3": None,
}
]
else:
assert results == []

0 comments on commit 1561964

Please sign in to comment.