File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
tests/runtime_env_toolchain Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1010class RunTest (unittest .TestCase ):
1111 def test_ran (self ):
1212 rf = runfiles .Create ()
13- settings_path = rf .Rlocation (
14- "rules_python/tests/support/current_build_settings.json"
15- )
13+ try :
14+ settings_path = rf .Rlocation (
15+ "rules_python/tests/support/current_build_settings.json"
16+ )
17+ except ValueError as e :
18+ # The current toolchain being used has a buggy zip file bootstrap, which
19+ # leaves RUNFILES_DIR pointing at the first stage path and not the module
20+ # path.
21+ if platform .system () != "Windows" or "does not lie under the runfiles root" not in str (e ):
22+ raise e
23+ settings_path = "./tests/support/current_build_settings.json"
24+
1625 settings = json .loads (pathlib .Path (settings_path ).read_text ())
26+
1727 if platform .system () == "Windows" :
1828 self .assertEqual (
1929 "/_magic_pyruntime_sentinel_do_not_use" , settings ["interpreter_path" ]
You can’t perform that action at this time.
0 commit comments