File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1224,6 +1224,16 @@ def test_module_use_unuse(self):
12241224 self .assertEqual (os .getenv ('TEST123' ), 'three' )
12251225 self .modtool .unload (['test' ])
12261226
1227+ # Also test that load and unload a single path works when it is the only one
1228+ # Only for LMod as we have some shortcuts for avoiding the module call there
1229+ old_module_path = os .environ ['MODULEPATH' ]
1230+ del os .environ ['MODULEPATH' ]
1231+ self .modtool .use (test_dir1 )
1232+ self .assertEqual (os .environ ['MODULEPATH' ], test_dir1 )
1233+ self .modtool .unuse (test_dir1 )
1234+ self .assertFalse ('MODULEPATH' in os .environ )
1235+ os .environ ['MODULEPATH' ] = old_module_path # Restore
1236+
12271237 def test_module_use_bash (self ):
12281238 """Test whether effect of 'module use' is preserved when a new bash session is started."""
12291239 # this test is here as check for a nasty bug in how the modules tool is deployed
You can’t perform that action at this time.
0 commit comments