Skip to content

Commit

Permalink
test_apply_limit for 335c67a
Browse files Browse the repository at this point in the history
  • Loading branch information
parkervg committed Jun 22, 2024
1 parent 8bdef6d commit 78eae30
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test_single_table_blendsql.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,5 +551,19 @@ def test_query_options_arg(db, ingredients):
assert smoothie.df.values.flat[0] == "Paypal"


@pytest.mark.parametrize("db", databases)
def test_apply_limit(db, ingredients):
# commit 335c67a
blendsql = """
SELECT {{get_length('length', 'transactions::merchant')}} FROM transactions ORDER BY merchant LIMIT 1
"""
smoothie = blend(
query=blendsql,
db=db,
ingredients=ingredients,
)
assert smoothie.meta.num_values_passed == 1


if __name__ == "__main__":
pytest.main()

0 comments on commit 78eae30

Please sign in to comment.