File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -122,10 +122,12 @@ def test_run_module(self):
122122 error_pattern = "Module command '.*thisdoesnotmakesense' failed with exit code [1-9]"
123123 self .assertErrorRegex (EasyBuildError , error_pattern , self .modtool .run_module , 'thisdoesnotmakesense' )
124124
125- # we need to use a different error pattern here with Environment Modules,
126- # because a load of a non-existing module doesnt' trigger a non-zero exit code...
127- # it will still fail though, just differently
128- if isinstance (self .modtool , EnvironmentModulesC ) or isinstance (self .modtool , EnvironmentModules ):
125+ # we need to use a different error pattern here with EnvironmentModulesC and
126+ # EnvironmentModules <5.5, because a load of a non-existing module doesnt' trigger a
127+ # non-zero exit code. it will still fail though, just differently
128+ version = LooseVersion (self .modtool .version )
129+ if (isinstance (self .modtool , EnvironmentModulesC )
130+ or (isinstance (self .modtool , EnvironmentModules ) and version < '5.5' )):
129131 error_pattern = "Unable to locate a modulefile for 'nosuchmodule/1.2.3'"
130132 else :
131133 error_pattern = "Module command '.*load nosuchmodule/1.2.3' failed with exit code [1-9]"
You can’t perform that action at this time.
0 commit comments