@@ -173,8 +173,10 @@ def test_build_easyconfigs_in_parallel_pbs_python(self):
173173 # dependencies for gzip/1.4-GCC-4.6.3: GCC/4.6.3 (toolchain) + toy/.0.0-deps
174174 self .assertTrue ('gzip-1.4-GCC-4.6.3.eb' in jobs [3 ].script )
175175 self .assertEqual (len (jobs [3 ].deps ), 2 )
176- regex = re .compile ('toy-0.0-deps.eb\s* --hidden' )
177- self .assertTrue (regex .search (jobs [3 ].deps [0 ].script ))
176+ regex = re .compile (r'toy-0.0-deps\.eb.* --hidden' )
177+ script_txt = jobs [3 ].deps [0 ].script
178+ fail_msg = "Pattern '%s' should be found in: %s" % (regex .pattern , script_txt )
179+ self .assertTrue (regex .search (script_txt ), fail_msg )
178180 self .assertTrue ('GCC-4.6.3.eb' in jobs [3 ].deps [1 ].script )
179181
180182 # also test use of --pre-create-installdir
@@ -290,6 +292,7 @@ def test_submit_jobs(self):
290292 '--try-toolchain=intel,2016a' , # should be excluded in job script
291293 '--robot' , self .test_prefix , # should be excluded in job script
292294 '--job' , # should be excluded in job script
295+ '--job-cores=3' ,
293296 ]
294297 eb_go = parse_options (args = args )
295298 cmd = submit_jobs ([toy_ec ], eb_go .generate_cmd_line (), testing = True )
@@ -306,16 +309,17 @@ def test_submit_jobs(self):
306309 ' eb %\(spec\)s ' ,
307310 ' %\(add_opts\)s ' ,
308311 ' --testoutput=%\(output_dir\)s' ,
312+ ' --disable-job ' ,
309313 ]
310314 for regex in regexs :
311315 regex = re .compile (regex )
312316 self .assertTrue (regex .search (cmd ), "Pattern '%s' found in: %s" % (regex .pattern , cmd ))
313317
314318 # these patterns should NOT be found, these options get filtered out
315319 # (self.test_prefix was argument to --robot)
316- for regex in ['--job' , '--try-toolchain' , '--robot=[ =]' , self .test_prefix + ' ' ]:
320+ for regex in ['--job' , '--job-cores' , '-- try-toolchain' , '--robot=[ =]' , self .test_prefix + ' ' ]:
317321 regex = re .compile (regex )
318- self .assertFalse (regex .search (cmd ), "Pattern '%s' *not* found in: %s" % (regex .pattern , cmd ))
322+ self .assertFalse (regex .search (cmd ), "Pattern '%s' should *not* be found in: %s" % (regex .pattern , cmd ))
319323
320324 def test_build_easyconfigs_in_parallel_slurm (self ):
321325 """Test build_easyconfigs_in_parallel(), using (mocked) Slurm as backend for --job."""
0 commit comments