{"id":26883,"library":"databricks-test","title":"databricks-test","description":"A Python library for unit testing and mocking in Databricks environments. Current version 0.0.4, released by Microsoft as a sample. Minimal releases; appears to be in early maintenance mode.","status":"maintenance","version":"0.0.4","language":"python","source_language":"en","source_url":"https://github.com/microsoft/DataOps","tags":["databricks","testing","mock","unit-testing","microsoft"],"install":[{"cmd":"pip install databricks-test","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Primary mocking utility for Databricks DBUtils","symbol":"mock_dbutils","correct":"from databricks_test import mock_dbutils"},{"note":"Class-based mock for DBUtils","symbol":"MockDbutils","correct":"from databricks_test import MockDbutils"},{"note":"Factory for mock SparkSession","symbol":"create_mock_spark","correct":"from databricks_test import create_mock_spark"}],"quickstart":{"code":"from databricks_test import mock_dbutils\n\ndbutils = mock_dbutils(dbutils_type='default')\nprint(dbutils.fs.ls('/'))","lang":"python","description":"Basic test using mock_dbutils."},"warnings":[{"fix":"Check the source code for available mocks; submit issues for missing ones.","message":"The library is very early (v0.0.4) and likely incomplete. Not all DBUtils methods are mocked.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider using other frameworks (e.g., chispa, delta-spark) for more advanced testing.","message":"Mocking SparkSession may not cover all Databricks-specific features. Use for basic unit tests only.","severity":"gotcha","affected_versions":"all"},{"fix":"Plan to migrate to a more supported testing library if needed.","message":"Official Microsoft samples are not actively maintained; no new releases since initial version.","severity":"deprecated","affected_versions":"0.0.4"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install databricks-test","cause":"Library not installed or Python environment does not have it.","error":"ModuleNotFoundError: No module named 'databricks_test'"},{"fix":"Use: from databricks_test import mock_dbutils (ensure version 0.0.4)","cause":"Wrong import path or library version mismatch.","error":"AttributeError: module 'databricks_test' has no attribute 'mock_dbutils'"},{"fix":"Check the source code for valid parameters; default call: mock_dbutils()","cause":"API changed or incorrect parameter usage.","error":"TypeError: mock_dbutils() got an unexpected keyword argument 'dbutils_type'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}