Skip to content

Commit

Permalink
Activate full_text unit test on SQLite
Browse files Browse the repository at this point in the history
  • Loading branch information
danielballan committed May 14, 2024
1 parent 10c21ad commit e46125e
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tiled/_tests/test_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,10 @@ def test_contains(client):


def test_full_text(client):
if client.metadata["backend"] in {"sqlite"}:

def cm():
return fail_with_status_code(HTTP_400_BAD_REQUEST)

else:
cm = nullcontext
with cm():
assert list(client.search(FullText("z"))) == ["z", "does_contain_z"]
# plainto_tsquery fails to find certain words, weirdly, so it is a useful
# test that we are using tsquery
assert list(client.search(FullText("purple"))) == ["full_text_test_case"]
assert list(client.search(FullText("z"))) == ["z", "does_contain_z"]
# plainto_tsquery fails to find certain words, weirdly, so it is a useful
# test that we are using tsquery
assert list(client.search(FullText("purple"))) == ["full_text_test_case"]


def test_regex(client):
Expand Down

0 comments on commit e46125e

Please sign in to comment.