!43 make the test check and adapt python2 grammer

From: @zhuofeng6 
Reviewed-by: @hubin95 
Signed-off-by: @hubin95
This commit is contained in:
openeuler-ci-bot 2024-01-26 02:45:12 +00:00 committed by Gitee
commit 6328446fbc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 13 additions and 2 deletions

View File

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

View File

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