@@ -989,7 +989,8 @@ def test_copy_ec(self):
989989 test_ec = os .path .join (self .test_prefix , 'test.eb' )
990990 args = ['--copy-ec' , 'toy-0.0.eb' , test_ec ]
991991 stdout = self .mocked_main (args )
992- self .assertEqual (stdout , 'toy-0.0.eb copied to %s' % test_ec )
992+ regex = re .compile (r'.*/toy-0.0.eb copied to %s' % test_ec )
993+ self .assertTrue (regex .search (stdout ), "Pattern '%s' found in: %s" % (regex .pattern , stdout ))
993994
994995 self .assertTrue (os .path .exists (test_ec ))
995996 self .assertEqual (toy_ec_txt , read_file (test_ec ))
@@ -1003,7 +1004,8 @@ def test_copy_ec(self):
10031004
10041005 args = ['--copy-ec' , 'toy-0.0.eb' , target_fn ]
10051006 stdout = self .mocked_main (args )
1006- self .assertEqual (stdout , 'toy-0.0.eb copied to test.eb' )
1007+ regex = re .compile (r'.*/toy-0.0.eb copied to test.eb' )
1008+ self .assertTrue (regex .search (stdout ), "Pattern '%s' found in: %s" % (regex .pattern , stdout ))
10071009
10081010 change_dir (cwd )
10091011
@@ -1015,7 +1017,8 @@ def test_copy_ec(self):
10151017 mkdir (test_target_dir )
10161018 args = ['--copy-ec' , 'toy-0.0.eb' , test_target_dir ]
10171019 stdout = self .mocked_main (args )
1018- self .assertEqual (stdout , 'toy-0.0.eb copied to %s' % test_target_dir )
1020+ regex = re .compile (r'.*/toy-0.0.eb copied to %s' % test_target_dir )
1021+ self .assertTrue (regex .search (stdout ), "Pattern '%s' found in: %s" % (regex .pattern , stdout ))
10191022
10201023 copied_toy_ec = os .path .join (test_target_dir , 'toy-0.0.eb' )
10211024 self .assertTrue (os .path .exists (copied_toy_ec ))
@@ -1067,15 +1070,15 @@ def check_copied_files():
10671070 self .assertEqual (len (os .listdir (os .getcwd ())), 0 )
10681071 args = ['--copy-ec' , 'toy-0.0.eb' ]
10691072 stdout = self .mocked_main (args )
1070- regex = re .compile ('toy-0.0.eb copied to .*/%s' % os .path .basename (test_working_dir ))
1073+ regex = re .compile ('.*/ toy-0.0.eb copied to .*/%s' % os .path .basename (test_working_dir ))
10711074 self .assertTrue (regex .match (stdout ), "Pattern '%s' found in: %s" % (regex .pattern , stdout ))
10721075 copied_toy_cwd = os .path .join (test_working_dir , 'toy-0.0.eb' )
10731076 self .assertTrue (os .path .exists (copied_toy_cwd ))
10741077 self .assertEqual (read_file (copied_toy_cwd ), toy_ec_txt )
10751078
10761079 # --copy-ec without arguments results in a proper error
10771080 args = ['--copy-ec' ]
1078- error_pattern = "One of more files to copy should be specified!"
1081+ error_pattern = "One or more files to copy should be specified!"
10791082 self .assertErrorRegex (EasyBuildError , error_pattern , self .eb_main , args , raise_error = True )
10801083
10811084 def test_copy_ec_from_pr (self ):
@@ -1191,7 +1194,8 @@ def test_copy_ec_from_pr(self):
11911194 args = ['--copy-ec' , '--from-pr' , '11521' , test_ec ]
11921195 ec_pr11521 = "ExifTool-12.00-GCCcore-9.3.0.eb"
11931196 stdout = self .mocked_main (args )
1194- self .assertEqual (stdout , '%s copied to %s' % (ec_pr11521 , test_ec ))
1197+ regex = re .compile (r'.*/%s copied to %s' % (ec_pr11521 , test_ec ))
1198+ self .assertTrue (regex .search (stdout ), "Pattern '%s' found in: %s" % (regex .pattern , stdout ))
11951199 self .assertTrue (os .path .exists (test_ec ))
11961200 remove_file (test_ec )
11971201
0 commit comments