diff --git a/Makefile b/Makefile index eb8fe8397..8d388eb8a 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ test: pytest -m 'not integration and not benchmark' --cov=databricks --cov-report html tests integration: - pytest -n auto -m 'integration and not benchmark' --reruns 2 --dist loadgroup --cov=databricks --cov-report html tests + pytest -n auto -m 'integration and not benchmark' --reruns 2 --dist loadgroup --cov=databricks --cov-report html tests/integration/test_dbutils.py::test_put_local_path benchmark: pytest -m 'benchmark' tests diff --git a/tests/integration/test_dbutils.py b/tests/integration/test_dbutils.py index a7e780eb3..8ec60d689 100644 --- a/tests/integration/test_dbutils.py +++ b/tests/integration/test_dbutils.py @@ -3,11 +3,18 @@ import os import pytest - +import platform from databricks.sdk.core import DatabricksError from databricks.sdk.errors import NotFound +def test_put_local_path(w, random, tmp_path): + to_write = random(1024 * 1024 * 2) + tmp_path = tmp_path / "tmp_file" + w.dbutils.fs.put(tmp_path, to_write, True) + assert w.dbutils.fs.head(tmp_path, 1024*1024*2) == to_write + + def test_rest_dbfs_ls(w, env_or_skip): from databricks.sdk.runtime import dbutils