File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ def test_julia_hook_with_startup(tmp_path):
3636 # We will temporarily use a new Julia depot so we can freely write a
3737 # startup.jl file
3838 existing_depot = os .getenv ('JULIA_DEPOT_PATH' )
39+ # Set a new environment dir so we can test the install process
40+ existing_environment_dir = julia .ENVIRONMENT_DIR
41+ julia .ENVIRONMENT_DIR = 'juliaenv-test-startup'
3942 try :
4043 with tempfile .TemporaryDirectory () as depot_tempdir :
4144 os .environ ['JULIA_DEPOT_PATH' ] = depot_tempdir
@@ -45,9 +48,11 @@ def test_julia_hook_with_startup(tmp_path):
4548 # write a startup.jl file that throws an error so
4649 # we know it's not used
4750 startup .write_text ('error("Startup file used!")\n ' )
48- # check that the test still succeeds even with a bad startup file
51+ # check that install & test succeeds with bad startup file
4952 test_julia_hook (tmp_path )
5053 finally :
54+ # restore environment dir
55+ julia .ENVIRONMENT_DIR = existing_environment_dir
5156 # restore old depot
5257 if existing_depot is None :
5358 del os .environ ['JULIA_DEPOT_PATH' ]
You can’t perform that action at this time.
0 commit comments