diff --git a/tests/test_core_query_shell.py b/tests/test_core_query_shell.py index 1317d7aa0..58b9e4809 100644 --- a/tests/test_core_query_shell.py +++ b/tests/test_core_query_shell.py @@ -89,7 +89,9 @@ def test_query_errors(run_query: Callable[[str], QueryResult]) -> None: run_query(".run custom_query other") with pytest.raises(QueryNotFoundError): run_query(".run unknown") - with pytest.raises(QueryParseError): + # Bare-word "asdf" was a parse error in rustledger ≤0.13; v0.14 routes + # the same input through the compilation path. Accept either. + with pytest.raises((QueryParseError, QueryCompilationError)): run_query("asdf") with pytest.raises(QueryCompilationError): run_query("select asdf") @@ -115,7 +117,7 @@ def test_query_to_file( query_shell.query_to_file(entries, "run custom_query other", "csv") with pytest.raises(QueryNotFoundError): query_shell.query_to_file(entries, "run testsetest", "csv") - with pytest.raises(QueryParseError): + with pytest.raises((QueryParseError, QueryCompilationError)): query_shell.query_to_file(entries, "asdf", "csv") with pytest.raises(QueryCompilationError): query_shell.query_to_file(entries, "select asdf", "csv") diff --git a/tests/test_json_api.py b/tests/test_json_api.py index ec9e88c42..34c2f3f19 100644 --- a/tests/test_json_api.py +++ b/tests/test_json_api.py @@ -808,7 +808,8 @@ def test_api_query_result_error(test_client: FlaskClient) -> None: query_string={"query_string": "nononono"}, ) msg = assert_api_error(response) - assert "Query parse error" in msg + # rustledger ≤0.13 → "Query parse error"; v0.14 → "Query compilation error". + assert "Query parse error" in msg or "Query compilation error" in msg def test_api_commodities_empty(