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 hashes)
Built Distribution
Close
Hashes for pytest_dbx-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbaa562fc8b38500fcece8fb09b781b9696b8244ec605e436f657d2a2c5f3b23 |
|
MD5 | 72a35f4e08c1792404495c6ae31acc40 |
|
BLAKE2b-256 | 2a72074bdd5150ed52264248da00e65cd77d1e65b7fb05b7bae8d0c827127c9b |