diff --git a/tests/syntax-tests/create_highlighted_versions.py b/tests/syntax-tests/create_highlighted_versions.py index e7a37fdf..70e5048a 100755 --- a/tests/syntax-tests/create_highlighted_versions.py +++ b/tests/syntax-tests/create_highlighted_versions.py @@ -24,12 +24,15 @@ SKIP_FILENAMES = [ def get_options(source): - source_dirpath = path.dirname(source) options = BAT_OPTIONS.copy() + + source_dirpath = path.dirname(source) options_file = path.join(source_dirpath, "bat_options") - if path.exists(options_file): + try: with open(options_file, "r") as f: options += list(map(lambda x: x.rstrip(), f.readlines())) + except FileNotFoundError: + pass return options