Make the tests work with pygments 2.13
This commit is contained in:
parent
28b591789c
commit
46cdf547e3
@ -96,6 +96,15 @@ complex functional testing for applications and libraries.
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{base_version}%{?prerelease}
|
||||
|
||||
# Between 7.2.0 and 7.2.1 the tests were updated for pygments 2.14.
|
||||
# See https://github.com/pytest-dev/pytest/pull/10632 + 10637 (backport to 7.2).
|
||||
# To make the tests work with pygments 2.13, we set the added {endline}s to empty.
|
||||
# Once pygments 2.14+ is omnipresent, feel free to remove this hack,
|
||||
# but bump the minimal BuildRequired version of python3-pygments to 2.14.
|
||||
%if v"0%(%{python3} -c "import pygments; print(pygments.__version__)")" < v"2.14~~"
|
||||
sed -i 's/"endline": "\\x1b\[90m\\x1b\[39;49;00m",/"endline": "",/' testing/conftest.py
|
||||
%endif
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -r
|
||||
|
Loading…
Reference in New Issue
Block a user