Skip to content

Commit d431967

Browse files
authored
Fix test failure: test_workspace_object_crawler (#2677)
## Changes [Pytester](https://github.com/databrickslabs/pytester) adopted return type `WorkspacePath` for `make_notebook` Changes for `make_notebook` fixture applied in this PR ### Linked issues Resolves #2670 ### Tests - [x] changed integration tests `test_workspace_object_crawler`
1 parent 9d4724f commit d431967

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tests/integration/assessment/test_assessment.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,16 @@
4040

4141

4242
@retried(on=[NotFound], timeout=timedelta(minutes=5))
43-
def test_workspace_object_crawler(ws, make_notebook, inventory_schema, sql_backend):
43+
def test_workspace_object_crawler(ws, make_notebook, inventory_schema, sql_backend) -> None:
4444
notebook = make_notebook()
45-
workspace_listing = WorkspaceListing(ws, sql_backend, inventory_schema)
46-
workspace_objects = {_.path: _ for _ in workspace_listing.snapshot()}
4745

48-
assert notebook in workspace_objects
49-
assert workspace_objects[notebook].object_type == "NOTEBOOK"
46+
workspace_listing = WorkspaceListing(
47+
ws,
48+
sql_backend,
49+
inventory_schema,
50+
start_path=str(notebook.parent),
51+
)
52+
53+
workspace_objects = {_.path: _ for _ in workspace_listing.snapshot()}
54+
assert str(notebook) in workspace_objects
55+
assert workspace_objects[str(notebook)].object_type == "NOTEBOOK"

0 commit comments

Comments
 (0)