Skip to content

Commit

Permalink
fix(ux): remove reference to DatasetQuery (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
shcheklein authored Jul 20, 2024
1 parent b282fb9 commit 80672d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/datachain/catalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ def query(
)
if proc.returncode == QUERY_SCRIPT_INVALID_LAST_STATEMENT_EXIT_CODE:
raise QueryScriptRunError(
"Last line in a script was not an instance of DatasetQuery",
"Last line in a script was not an instance of DataChain",
return_code=proc.returncode,
output=output,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/func/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ def test_query_last_statement_not_ds_query_instance(mock_popen, cloud_test_catal
with pytest.raises(QueryScriptRunError) as exc_info:
catalog.query(query_script)
assert str(exc_info.value).startswith(
"Last line in a script was not an instance of DatasetQuery"
"Last line in a script was not an instance of DataChain"
)


Expand Down
4 changes: 2 additions & 2 deletions tests/func/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def test_query_cli_no_dataset_returned(

with pytest.raises(
QueryScriptRunError,
match="Last line in a script was not an instance of DatasetQuery",
match="Last line in a script was not an instance of DataChain",
):
query(catalog, str(filepath), "my-dataset", columns=["name"])

Expand All @@ -159,7 +159,7 @@ def test_query_cli_no_dataset_returned(
assert latest_job[1] == os.path.basename(filepath)
assert latest_job[2] == JobStatus.FAILED
assert latest_job[3] == JobQueryType.PYTHON
assert latest_job[4] == "Last line in a script was not an instance of DatasetQuery"
assert latest_job[4] == "Last line in a script was not an instance of DataChain"
assert latest_job[5].find("datachain.error.QueryScriptRunError")


Expand Down

0 comments on commit 80672d6

Please sign in to comment.