1212
1313import pytest
1414
15- import isaaclab ._paths as paths
15+ import isaaclab
16+ import isaaclab .__main__ as package_main
1617import isaaclab .cli as cli
18+ import isaaclab .paths as paths
1719
1820pytestmark = pytest .mark .unit
1921
@@ -23,10 +25,30 @@ def test_resolves_partial_source_checkout_root(tmp_path):
2325 package_root = tmp_path / "source" / "isaaclab" / "isaaclab"
2426 package_root .mkdir (parents = True )
2527
26- with mock .patch .object (paths , "__file__" , str (package_root / "_paths .py" )):
28+ with mock .patch .object (paths , "__file__" , str (package_root / "paths .py" )):
2729 assert paths ._resolve_isaaclab_root () == tmp_path
2830
2931
32+ def test_top_level_compatibility_api_is_preserved ():
33+ """The flattened package must retain the aggregate wheel's public shims."""
34+ assert callable (isaaclab .bootstrap_kernel )
35+ with mock .patch .object (package_main , "main" , return_value = 0 ) as main , pytest .raises (SystemExit , match = "0" ):
36+ isaaclab .main ()
37+
38+ main .assert_called_once_with ()
39+
40+
41+ def test_legacy_vscode_option_uses_compatibility_dispatcher ():
42+ """The installed entry point must continue to recognize the legacy VS Code option."""
43+ with (
44+ mock .patch .object (sys , "argv" , ["isaaclab" , "--generate-vscode-settings" ]),
45+ mock .patch .object (package_main , "generate_vscode_settings" ) as generate ,
46+ ):
47+ package_main .main ()
48+
49+ generate .assert_called_once_with ()
50+
51+
3052@pytest .mark .parametrize (
3153 ("command" , "runner" ),
3254 [
0 commit comments