@@ -190,9 +190,9 @@ def test_find_glob_pattern(self):
190
190
os .path .join (tmpdir , 'python3.5m' , 'include' ))
191
191
self .assertEqual (ft .find_glob_pattern (os .path .join (tmpdir , 'python3.6*' ), False ), None )
192
192
self .assertRaisesRegex (EasyBuildError , "Was expecting exactly" , ft .find_glob_pattern ,
193
- os .path .join (tmpdir , 'python3.6*' ))
193
+ os .path .join (tmpdir , 'python3.6*' ))
194
194
self .assertRaisesRegex (EasyBuildError , "Was expecting exactly" , ft .find_glob_pattern ,
195
- os .path .join (tmpdir , 'python*' ))
195
+ os .path .join (tmpdir , 'python*' ))
196
196
197
197
def test_encode_class_name (self ):
198
198
"""Test encoding of class names."""
@@ -360,8 +360,8 @@ def test_checksums(self):
360
360
self .assertTrue (ft .verify_checksum (fp , {os .path .basename (fp ): None }))
361
361
faulty_dict = {'wrong-name' : known_checksums ['sha256' ]}
362
362
self .assertRaisesRegex (EasyBuildError ,
363
- "Missing checksum for " + os .path .basename (fp ) + " in .*wrong-name.*" ,
364
- ft .verify_checksum , fp , faulty_dict )
363
+ "Missing checksum for " + os .path .basename (fp ) + " in .*wrong-name.*" ,
364
+ ft .verify_checksum , fp , faulty_dict )
365
365
366
366
# check whether missing checksums are enforced
367
367
build_options = {
@@ -374,7 +374,7 @@ def test_checksums(self):
374
374
375
375
# Test dictionary-type checksums
376
376
self .assertRaisesRegex (EasyBuildError , "Missing checksum for" , ft .verify_checksum ,
377
- fp , {os .path .basename (fp ): None })
377
+ fp , {os .path .basename (fp ): None })
378
378
for checksum in [known_checksums [x ] for x in ['sha256' ]]:
379
379
dict_checksum = {os .path .basename (fp ): checksum , 'foo' : 'baa' }
380
380
self .assertTrue (ft .verify_checksum (fp , dict_checksum ))
@@ -881,9 +881,9 @@ def test_symlink_resolve_path(self):
881
881
test_file2 = os .path .join (link_dir , 'test2.txt' )
882
882
ft .write_file (test_file , "test123" )
883
883
self .assertRaisesRegex (EasyBuildError ,
884
- "Trying to symlink %s to %s, but the symlink already exists and points to %s." %
885
- (test_file2 , link , test_file ),
886
- ft .symlink , test_file2 , link )
884
+ "Trying to symlink %s to %s, but the symlink already exists and points to %s." %
885
+ (test_file2 , link , test_file ),
886
+ ft .symlink , test_file2 , link )
887
887
888
888
# test resolve_path
889
889
self .assertEqual (test_dir , ft .resolve_path (link_dir ))
@@ -1436,7 +1436,8 @@ def test_adjust_permissions(self):
1436
1436
err_msg = "Failed to chmod/chown several paths.*No such file or directory"
1437
1437
self .assertRaisesRegex (EasyBuildError , err_msg , ft .adjust_permissions , nosuchdir , stat .S_IWOTH )
1438
1438
nosuchfile = os .path .join (self .test_prefix , 'nosuchfile' )
1439
- self .assertRaisesRegex (EasyBuildError , err_msg , ft .adjust_permissions , nosuchfile , stat .S_IWUSR , recursive = False )
1439
+ self .assertRaisesRegex (EasyBuildError , err_msg , ft .adjust_permissions ,
1440
+ nosuchfile , stat .S_IWUSR , recursive = False )
1440
1441
1441
1442
# try using adjust_permissions on a file not owned by current user,
1442
1443
# using permissions that are actually already correct;
@@ -1575,11 +1576,11 @@ def test_apply_regex_substitutions(self):
1575
1576
error_pat = "Nothing found to replace 'Not there' in %s" % testfile
1576
1577
# Error
1577
1578
self .assertRaisesRegex (EasyBuildError , error_pat , ft .apply_regex_substitutions , testfile , regex_subs_no_match ,
1578
- on_missing_match = ERROR )
1579
+ on_missing_match = ERROR )
1579
1580
# First matches, but 2nd not
1580
1581
regex_subs_part_match = [regex_subs [0 ], ('Not there' , 'Not used' )]
1581
1582
self .assertRaisesRegex (EasyBuildError , error_pat , ft .apply_regex_substitutions , testfile , regex_subs_part_match ,
1582
- on_missing_match = ERROR , match_all = True )
1583
+ on_missing_match = ERROR , match_all = True )
1583
1584
# First matched so OK with match_all
1584
1585
ft .apply_regex_substitutions (testfile , regex_subs_part_match ,
1585
1586
on_missing_match = ERROR , match_all = False )
@@ -1846,9 +1847,9 @@ def test_create_patch_info(self):
1846
1847
self .assertRaisesRegex (EasyBuildError , error_msg , ft .create_patch_info , {'name' : 'foo.txt' })
1847
1848
self .assertRaisesRegex (EasyBuildError , error_msg , ft .create_patch_info , {'name' : 'foo.txt' , 'random' : 'key' })
1848
1849
self .assertRaisesRegex (EasyBuildError , error_msg , ft .create_patch_info ,
1849
- {'name' : 'foo.txt' , 'copy' : 'subdir' , 'sourcepath' : 'subdir' })
1850
+ {'name' : 'foo.txt' , 'copy' : 'subdir' , 'sourcepath' : 'subdir' })
1850
1851
self .assertRaisesRegex (EasyBuildError , error_msg , ft .create_patch_info ,
1851
- {'name' : 'foo.txt' , 'copy' : 'subdir' , 'level' : 1 })
1852
+ {'name' : 'foo.txt' , 'copy' : 'subdir' , 'level' : 1 })
1852
1853
self .assertRaisesRegex (EasyBuildError , error_msg , ft .create_patch_info , ('foo.patch' , [1 , 2 ]))
1853
1854
error_msg = "Unknown patch specification"
1854
1855
self .assertRaisesRegex (EasyBuildError , error_msg , ft .create_patch_info , ('foo.patch' , 1 , 'subdir' ))
@@ -3974,7 +3975,7 @@ def test_create_unused_dir(self):
3974
3975
ft .adjust_permissions (readonly_dir , stat .S_IREAD | stat .S_IEXEC , relative = False )
3975
3976
try :
3976
3977
self .assertRaisesRegex (EasyBuildError , 'Failed to create directory' ,
3977
- ft .create_unused_dir , readonly_dir , 'new_folder' )
3978
+ ft .create_unused_dir , readonly_dir , 'new_folder' )
3978
3979
finally :
3979
3980
ft .adjust_permissions (readonly_dir , old_perms , relative = False )
3980
3981
0 commit comments