@@ -44,7 +44,7 @@ def _lint(definition_file: str) -> bool:
4444 print (f'! The yamllint file ({ _YAMLLINT_FILE } ) is missing' )
4545 return False
4646
47- errors = linter .run (open (definition_file ),
47+ errors = linter .run (open (definition_file , encoding = 'UTF-8' ),
4848 YamlLintConfig (file = _YAMLLINT_FILE ))
4949 if errors :
5050 # We're given a 'generator' and we don't know if there are errors
@@ -104,7 +104,7 @@ def _load(skip_lint: bool = False) -> Tuple[List[DefaultMunch], int]:
104104 if not _lint (jd_filename ):
105105 return [], - 1
106106
107- with open (jd_filename , 'r' ) as jd_file :
107+ with open (jd_filename , 'r' , encoding = 'UTF-8' ) as jd_file :
108108 job_def : Dict [str , Any ] = yaml .load (jd_file , Loader = yaml .FullLoader )
109109 if job_def :
110110 jd_munch : DefaultMunch = DefaultMunch .fromDict (job_def )
@@ -171,7 +171,7 @@ def _check_exists(name: str, path: str, expected: bool) -> bool:
171171def _check_line_count (name : str , path : str , expected : int ) -> bool :
172172
173173 line_count : int = 0
174- for _ in open (path ):
174+ for _ in open (path , encoding = 'UTF-8' ):
175175 line_count += 1
176176
177177 if line_count != expected :
@@ -339,10 +339,10 @@ def _test(args: argparse.Namespace,
339339 job_definition .tests [job_test_name ].checks .exitCode
340340
341341 if exit_code != expected_exit_code :
342- print (f '! FAILURE' )
342+ print ('! FAILURE' )
343343 print (f'! exit_code={ exit_code } '
344344 f' expected_exit_code={ expected_exit_code } ' )
345- print (f '! Container output follows...' )
345+ print ('! Container output follows...' )
346346 print (out )
347347 test_status = False
348348
@@ -471,7 +471,7 @@ def main() -> int:
471471 # If so wipe, and leave.
472472 if args .wipe :
473473 _wipe ()
474- print (f 'Done [Wiped]' )
474+ print ('Done [Wiped]' )
475475 return 0
476476
477477 # Load all the files we can and then run the tests.
0 commit comments