diff --git a/fix-test-error.patch b/fix-test-error.patch new file mode 100644 index 0000000..2e380f4 --- /dev/null +++ b/fix-test-error.patch @@ -0,0 +1,106 @@ +diff --git a/test/test_parsers/test_rst/test_directives/test_code.py b/test-edit/test_parsers/test_rst/test_directives/test_code.py +index 8e694c5..1139620 100644 +--- a/test/test_parsers/test_rst/test_directives/test_code.py ++++ b/test-edit/test_parsers/test_rst/test_directives/test_code.py +@@ -96,16 +96,16 @@ totest['code'] = [ + + totest['code-parsing'] = [ + ["""\ +-.. code:: python ++.. code:: python3 + :class: testclass + + print('hello world') # to stdout + """, + """\ + +- ++ + \n\ +- ++ + print + + ( +@@ -118,7 +118,7 @@ totest['code-parsing'] = [ + # to stdout + """], + ["""\ +-.. code:: python ++.. code:: python3 + :class: testclass + :name: my_function + :number-lines: 7 +@@ -132,7 +132,7 @@ totest['code-parsing'] = [ + """, + """\ + +- ++ + + 7 \n\ + +@@ -165,7 +165,7 @@ totest['code-parsing'] = [ + + 12 \n\ + \n\ +- ++ + print + + ( +diff --git a/test/test_parsers/test_rst/test_directives/test_code_long.py b/test-edit/test_parsers/test_rst/test_directives/test_code_long.py +index aea0013..ccedd78 100644 +--- a/test/test_parsers/test_rst/test_directives/test_code_long.py ++++ b/test-edit/test_parsers/test_rst/test_directives/test_code_long.py +@@ -22,7 +22,7 @@ totest = {} + + totest['code-parsing-long'] = [ + ["""\ +-.. code:: python ++.. code:: python3 + :number-lines: 7 + + def my_function(): +@@ -34,7 +34,7 @@ totest['code-parsing-long'] = [ + """, + """\ + +- ++ + + 7 \n\ + +@@ -67,7 +67,7 @@ totest['code-parsing-long'] = [ + + 12 \n\ + \n\ +- ++ + print + + ( +diff --git a/test/test_parsers/test_rst/test_interpreted.py b/test-edit/test_parsers/test_rst/test_interpreted.py +index 6380b48..e7be2eb 100755 +--- a/test/test_parsers/test_rst/test_interpreted.py ++++ b/test-edit/test_parsers/test_rst/test_interpreted.py +@@ -269,7 +269,7 @@ Custom role based on code role: + Custom role based on code role: + + .. role:: python(code) +- :language: python ++ :language: python3 + :class: testclass + + Python code :python:`print("The end")`. +@@ -280,8 +280,8 @@ Python code :python:`print("The end")`. + Custom role based on code role: + + Python code \n\ +- +- ++ ++ + print + + ( diff --git a/python-docutils.spec b/python-docutils.spec index 031139b..7b9e16a 100644 --- a/python-docutils.spec +++ b/python-docutils.spec @@ -4,7 +4,7 @@ Name: python-%{modname} Version: 0.16 -Release: 2 +Release: 3 Summary: Documentation Utilities Written in Python, for General- and Special-Purpose Use License: Public Domain and BSD and Python and GPLv3+ URL: http://docutils.sourceforge.net @@ -13,6 +13,7 @@ BuildArch: noarch BuildRequires: python2-devel python2-setuptools BuildRequires: python3-devel python2-tools +Patch0000: fix-test-error.patch %global _description \ Docutils is an open-source text processing system for processing plaintext\ @@ -47,7 +48,7 @@ This package run under python3. %prep -%autosetup -n %{modname}-%{version} +%autosetup -n %{modname}-%{version} -p1 # Remove shebang from library files for file in {code_analyzer,punctuation_chars,error_reporting,smartquotes,math/latex2mathml,math/math2html}; do @@ -115,6 +116,9 @@ popd %doc THANKS.txt docs tools/editors %changelog +* Mon Aug 3 2020 wutao - 0.16-3 +- fix test error problem + * Wed Jul 29 2020 dingyue - 0.16-2 - Fix 0.16-1 for error