Pytest plugin to run unit tests for dbx (Databricks CLI extensions) related code
Project description
pytest-dbx
Pytest plugin for testing dbx-based projects.
Install
To use the fixtures in your project, simply add pytest-dbx
to your project's dev-dependencies
(where you would place all your test and build dependencies).
Fixtures
In unit tests you can use the dbx_spark
fixture to have a spark session available as in Databricks
def test_function(dbx_spark):
sdf = dbx_spark.createDataFrame([[1], [2], [3]], ['a'])
assert sdf.count() == 3
The dbutils_fixture
and mlflow_local
are automatically used.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest_dbx-0.1.0.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file pytest_dbx-0.1.0.tar.gz
.
File metadata
- Download URL: pytest_dbx-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.15.0-1023-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0731a1fc6834760735431ea44894954992cff94d0913edf431920ced34b9c49f |
|
MD5 | 1386492371ee884566e83480928e44e1 |
|
BLAKE2b-256 | 1ef5d1785e38c550dad37d7816db96b4b5a36a8369d76f522748fdb38ad9315a |
File details
Details for the file pytest_dbx-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pytest_dbx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.15.0-1023-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbaa562fc8b38500fcece8fb09b781b9696b8244ec605e436f657d2a2c5f3b23 |
|
MD5 | 72a35f4e08c1792404495c6ae31acc40 |
|
BLAKE2b-256 | 2a72074bdd5150ed52264248da00e65cd77d1e65b7fb05b7bae8d0c827127c9b |