@@ -4197,10 +4197,10 @@ def test_check_sha256_checksums(self):
41974197 # re-test with right checksum in place
41984198 toy_sha256 = '44332000aa33b99ad1e00cbd1a7da769220d74647060a10e807b916d73ea27bc'
41994199 test_ec_txt = checksums_regex .sub ('checksums = ["%s"]' % toy_sha256 , toy_ec_txt )
4200- test_ec_txt = re .sub (r'patches = \[(.|\n)*\]' , '' , test_ec_txt )
4200+ passing_test_ec_txt = re .sub (r'patches = \[(.|\n)*\]' , '' , test_ec_txt )
42014201
42024202 test_ec = os .path .join (self .test_prefix , 'toy-0.0-ok.eb' )
4203- write_file (test_ec , test_ec_txt )
4203+ write_file (test_ec , passing_test_ec_txt )
42044204 ecs , _ = parse_easyconfigs ([(test_ec , False )])
42054205 ecs = [ec ['ec' ] for ec in ecs ]
42064206
@@ -4236,6 +4236,15 @@ def test_check_sha256_checksums(self):
42364236 regex = re .compile (r"Non-SHA256 checksum\(s\) found for toy-0.0.tar.gz:.*not_really_a_sha256_checksum" )
42374237 self .assertTrue (regex .match (res [0 ]), "Pattern '%s' found in: %s" % (regex .pattern , res [0 ]))
42384238
4239+ # Extension with nosource: True
4240+ test_ec_txt = passing_test_ec_txt + "exts_list = [('bar', '0.0', { 'nosource': True })]"
4241+ toy_sha256 = '44332000aa33b99ad1e00cbd1a7da769220d74647060a10e807b916d73ea27bc'
4242+ test_ec = os .path .join (self .test_prefix , 'toy-0.0-nosource.eb' )
4243+ write_file (test_ec , test_ec_txt )
4244+ ecs , _ = parse_easyconfigs ([(test_ec , False )])
4245+ ecs = [ec ['ec' ] for ec in ecs ]
4246+ self .assertEqual (check_sha256_checksums (ecs ), [])
4247+
42394248 def test_deprecated (self ):
42404249 """Test use of 'deprecated' easyconfig parameter."""
42414250 topdir = os .path .dirname (os .path .abspath (__file__ ))
0 commit comments