Skip to content

Commit 156b12c

Browse files
committed
I haven't quite figured out how, but the actual module command, on systems
in which it is present, has some uncanny ability of replacing the one you exported when a new instance of bash is launched. So, on systems on which module is actually available, this test fails. Renaming the function should fix it.
1 parent 060ab83 commit 156b12c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/user_guide/pre_launch.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
module() {
3+
xmodule() {
44
case "$1" in
55
load)
66
export MODULE_TEST_LOADED="1"
@@ -16,6 +16,6 @@ module() {
1616
esac
1717
}
1818

19-
export -f module
19+
export -f xmodule
2020

21-
module load test
21+
xmodule load test

tests/user_guide/test_prelaunch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def test_user_guide_pre_launch() -> None:
1111
with _deploy(Path(script_dir) / 'pre_launch.sh') as pre_launch_sh_path:
1212
# START
1313
ex = JobExecutor.get_instance('local')
14-
spec = JobSpec('/bin/bash', ['-c', 'module is-loaded test'])
14+
spec = JobSpec('/bin/bash', ['-c', 'xmodule is-loaded test'])
1515
spec.pre_launch = pre_launch_sh_path
1616

1717
job = Job(spec)

0 commit comments

Comments
 (0)