diff --git a/CHANGES.rst b/CHANGES.rst index 512ebee02..078594cde 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -24,6 +24,7 @@ Fixed - Usage of the Black ``gen_python_files(gitignore_dict=...)`` parameter. - ``show_capture`` option in Pytest configuration. - Ignore some linter messages by recent versions of linters used in CI builds. +- Fix compatibility with Pygments 2.17.2 in unit tests. 1.7.2_ - 2023-07-12 diff --git a/src/darker/tests/test_main.py b/src/darker/tests/test_main.py index fd83d1a13..61d1c39eb 100644 --- a/src/darker/tests/test_main.py +++ b/src/darker/tests/test_main.py @@ -911,6 +911,9 @@ def test_modify_file(tmp_path, new_content, expect): f'{BLUE}print{RESET}({YELLOW}"{RESET}foo{YELLOW}"{RESET})\n', # Pygments 2.14.0, variant 1: f'{CYAN}print{RESET}({YELLOW}"{RESET}foo{YELLOW}"{RESET}){WHITE}{RESET}\n', + # Pygments 2.17.2 + f'{CYAN}print{RESET}({YELLOW}"{RESET}{YELLOW}foo{RESET}{YELLOW}"{RESET})' + f"{WHITE}{RESET}\n", ), ), )