Skip to content

Commit 9cc9d9d

Browse files
committed
test install branch too
1 parent 350d111 commit 9cc9d9d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/languages/julia_test.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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']

0 commit comments

Comments
 (0)