eumiro commented on code in PR #33541:
URL: https://github.com/apache/airflow/pull/33541#discussion_r1299301137
##########
tests/providers/databricks/operators/test_databricks_sql.py:
##########
@@ -268,16 +266,18 @@ def test_return_value_serialization():
),
],
)
-def test_exec_write_file(return_last, split_statements, sql, descriptions,
hook_results, do_xcom_push):
+def test_exec_write_file(
+ return_last, split_statements, sql, descriptions, hook_results,
do_xcom_push, tmp_path
+):
"""
Test the execute function in case where SQL query was successful and data
is written as CSV
"""
with
patch("airflow.providers.databricks.operators.databricks_sql.DatabricksSqlHook")
as db_mock_class:
- tempfile_path = tempfile.mkstemp()[1]
+ path = tmp_path / "testfile"
op = DatabricksSqlOperator(
task_id=TASK_ID,
sql=sql,
- output_path=tempfile_path,
+ output_path=path,
Review Comment:
Done. I'd tackle the code in a different PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]