From 2a541e58ba580c1d50a279e5a353667cb2049aa5 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Feb 07 2022 10:09:09 +0000 Subject: Fix failing test with Pygments 2.11 --- diff --git a/271.patch b/271.patch new file mode 100644 index 0000000..12f8b18 --- /dev/null +++ b/271.patch @@ -0,0 +1,28 @@ +From cdda8945e6a0a08eccce7d7ed91a4defa4d920d4 Mon Sep 17 00:00:00 2001 +From: Ast-x64 +Date: Wed, 26 Jan 2022 12:41:03 +0800 +Subject: [PATCH] Fix test_style_defs + +The pygments module made a change to default snippet styles in 2.11.0, + which breaks the test_style_defs unit here using predefined styles + from old pygments. +See https://github.com/pygments/pygments/pull/1940 for more information. +--- + tests/fixtures/snippet.css | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/fixtures/snippet.css b/tests/fixtures/snippet.css +index 6d430a01..228d0d77 100644 +--- a/tests/fixtures/snippet.css ++++ b/tests/fixtures/snippet.css +@@ -1,8 +1,8 @@ + .hll { background-color: #ffcccc } +-.c { color: #408080; font-style: italic } /* Comment */ ++.c { color: #3D7B7B; font-style: italic } /* Comment */ + .k { color: #008000; font-weight: bold } /* Keyword */ + .o { color: #666666 } /* Operator */ + .m { color: #666666 } /* Literal.Number */ + .s { color: #BA2121 } /* Literal.String */ +-.na { color: #7D9029 } /* Name.Attribute */ ++.na { color: #687822 } /* Name.Attribute */ + .nb { color: #008000 } /* Name.Builtin */ diff --git a/python-diff-cover.spec b/python-diff-cover.spec index e1b6227..29e7fbc 100644 --- a/python-diff-cover.spec +++ b/python-diff-cover.spec @@ -10,7 +10,7 @@ diff. Name: python-diff-cover Version: 6.4.4 -Release: 2%{?dist} +Release: 3%{?dist} BuildArch: noarch License: ASL 2.0 @@ -18,6 +18,10 @@ Summary: Automatically find diff lines that need test coverage URL: https://github.com/Bachmann1234/diff-cover/ Source0: %{url}/archive/v%{version}/diff-cover-%{version}.tar.gz +# Fix for failing Pygments test +# Backported from: https://github.com/Bachmann1234/diff_cover/pull/271 +Patch: 271.patch + BuildRequires: git BuildRequires: help2man BuildRequires: python3-devel @@ -57,7 +61,7 @@ Requires: python3-pygments >= 2.0.1 %prep -%autosetup -n diff_cover-%{version} +%autosetup -n diff_cover-%{version} -p1 %generate_buildrequires %pyproject_buildrequires @@ -98,6 +102,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{_bindir}/diff-quality %changelog +* Mon Feb 07 2022 Karolina Surma - 6.4.2-3 +- Fix failing Pygments test. Fixes rhbz#2042301 + * Fri Jan 21 2022 Fedora Release Engineering - 6.4.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild