test: keep subprocess imports on the active worktree

This commit is contained in:
阿白叔 committed 2026-11-17 00:39:29 +08:00
1 parent eabf61c73b
commit 5b7e7bea2f
3 files changed
+26 -1

No files matched your search

+2 -1
View File
@@ -147,7 +147,8 @@ def test_mapping_context_is_serialized_and_restored_before_catalog(tmp_path, mon
order.append(('mapping', drive, remote)))
monkeypatch.setattr(native, '_catalog_native', lambda job, root:
(order.append(('catalog', job['library'])) or {'success': True, 'safe_to_continue': True}))
assert native.management_worker_main(tmp_path/'catalog/request.json') == 0
assert captured[0]['worker_role'] == 'catalog_readonly'
assert native.catalog_worker_main(tmp_path/'catalog/request.json') == 0
assert order == [('mapping', 'S:', r'\\server\share'), ('catalog', str(library))]