Skip to content

Commit 85b9bfb

Browse files
authored
Mock WheelsV2 in unit-tests to avoid lengthy wheel-building. (#2281)
## Changes This PR updates some of the unit-testing fixtures to mock `WheelsV2` where this is referenced instead of the real thing; this avoids lengthy wheel-building during unit tests. (Wheel-building can easily exceed the 30s unit-testing deadline, especially on developer laptops with the solacc dataset present.)
1 parent 05d57e2 commit 85b9bfb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/unit/install/test_install_dashboards.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22
from datetime import timedelta
3+
from unittest import mock
34

45
import pytest
56
from databricks.labs.blueprint.installation import MockInstallation
@@ -23,7 +24,7 @@
2324
def workspace_installation(request, ws, any_prompt) -> WorkspaceInstallation:
2425
mock_installation = request.param if hasattr(request, "param") else MockInstallation()
2526
install_state = InstallState.from_installation(mock_installation)
26-
wheels = WheelsV2(mock_installation, PRODUCT_INFO)
27+
wheels = mock.create_autospec(WheelsV2)
2728
workflows_installation = WorkflowsDeployment(
2829
WorkspaceConfig(inventory_database="..."),
2930
mock_installation,

0 commit comments

Comments
 (0)