make the test check and adapt python2 grammer

This commit is contained in:
zhuofeng 2024-01-26 09:26:48 +08:00
parent a4b06334b5
commit 590e534d4e
2 changed files with 13 additions and 2 deletions

View File

@ -18,7 +18,7 @@ index 9741567..3230539 100644
"""Convert a value to lowercase."""
return soft_unicode(s).lower()
+_space_re = re.compile(r"\s", flags=re.ASCII)
+_space_re = re.compile(r"\s", re.U)
@evalcontextfilter
def do_xmlattr(_eval_ctx, d, autospace=True):

View File

@ -2,7 +2,7 @@
Name: python-jinja2
Version: 2.11.2
Release: 5
Release: 6
Summary: A full-featured template engine for Python
License: BSD
URL: http://jinja.pocoo.org/
@ -83,6 +83,11 @@ pushd python3
popd
%check
%if %{with python2}
pushd Jinja2-%{version}
PYTHONPATH=$(pwd)/src %{__python2} -m pytest tests
popd
%endif
pushd python3
PYTHONPATH=$(pwd)/src %{__python3} -m pytest tests
popd
@ -104,6 +109,12 @@ popd
%doc Jinja2-%{version}/ext Jinja2-%{version}/examples
%changelog
* Fri Jan 26 2024 zhuofeng <zhuofeng2@huawei.com> - 2.11.2-6
Type:bugfix
CVE:NA
SUG:NA
DESC:make the test check and adapt python2 grammer
* Thu Jan 25 2024 zhuofeng <zhuofeng2@huawei.com> - 2.11.2-5
Type:bugfix
CVE:NA