@@ -190,9 +190,10 @@ def test_parser_toolchain_regex(self):
190
190
self .assertEqual (tcversop .as_dict (), as_dict )
191
191
192
192
# only accept known toolchain names
193
+ RANDOM_BIT = 'ShouldNotMatch___'
193
194
fail_tests = [
194
- "x%s >= 1.2.3" % tc ,
195
- "%sx >= 1.2.3" % tc ,
195
+ f" { RANDOM_BIT } { tc } >= 1.2.3" ,
196
+ f" { tc } { RANDOM_BIT } >= 1.2.3" ,
196
197
"foo" ,
197
198
">= 1.2.3" ,
198
199
]
@@ -205,6 +206,7 @@ def test_parser_toolchain_regex(self):
205
206
def test_toolchain_versop_test (self ):
206
207
"""Test the ToolchainVersionOperator test"""
207
208
_ , tcs = search_toolchain ('' )
209
+ RANDOM_BIT = 'ShouldNotMatch___'
208
210
tc_names = [x .NAME for x in tcs ]
209
211
for tc in tc_names : # test all known toolchain names
210
212
# test version expressions with optional version operator
@@ -213,8 +215,8 @@ def test_toolchain_versop_test(self):
213
215
(tc , '1.2.3' , True ), # version ok, name ok
214
216
(tc , '1.2.4' , True ), # version ok, name ok
215
217
(tc , '1.2.2' , False ), # version not ok, name ok
216
- ('x' + tc , '1.2.3' , False ), # version ok, name not ok
217
- ('x' + tc , '1.2.2' , False ), # version not ok, name not ok
218
+ (RANDOM_BIT + tc , '1.2.3' , False ), # version ok, name not ok
219
+ (RANDOM_BIT + tc , '1.2.2' , False ), # version not ok, name not ok
218
220
)),
219
221
]
220
222
for txt , subtests in tests :
0 commit comments