Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test playground #698

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion tests/integration/test_dbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading