@@ -378,19 +378,23 @@ def test_new_compiler_installs(tmpdir, capsys, request):
378378 "config:spack" , {"global" : {"flags" : f"-C { config_path } " }}
379379 ):
380380 try :
381+ pkg_spec = "[email protected] +binutils" 382+ compiler_spec = "[email protected] " 381383 sr = SpackRunner (dry_run = True )
382384 sr .create_env (os .getcwd ())
383385 sr .activate ()
384386 sr .add_include_file (packages_path )
385387 sr .add_include_file (compilers_path )
386388 sr .generate_env_file ()
387- 389+ sr .
install_compiler (
"[email protected] +binutils " ,
"[email protected] " )
388390 captured = capsys .readouterr ()
389391
390392 assert (
391- "[email protected] is already an available compiler" 393+ f" { compiler_spec } is already an available compiler"
392394 in captured .out
393395 )
396+
397+ assert f"{ pkg_spec } " not in captured .out
394398 except RunnerError as e :
395399 pytest .skip ("%s" % e )
396400
@@ -563,11 +567,13 @@ def test_config_compiler_find_attribute(
563567 "config:spack" , {"compiler_find" : {attr : value }}
564568 ):
565569 try :
570+ pkg_spec = "[email protected] +binutils" 571+ compiler_spec = "[email protected] " 566572 sr = SpackRunner (dry_run = True )
567573 sr .create_env (os .getcwd ())
568574 sr .activate ()
569575 sr .add_include_file (compilers_path )
570- 576+ sr .install_compiler (pkg_spec , compiler_spec )
571577 captured = capsys .readouterr ()
572578
573579 assert expected_str in captured .out
0 commit comments