!3 解决python-m2r编译失败 AssertionError: 'optional arguments:' not found in 'usage: m2r.py
From: @penelope_y Reviewed-by: @shinwell_hu Signed-off-by: @shinwell_hu
This commit is contained in:
commit
c3575c1c30
25
0001-test_no_file.patch
Normal file
25
0001-test_no_file.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 0a21e67970593968f48770f12d52e40af110c823 Mon Sep 17 00:00:00 2001
|
||||||
|
From: penelope <anchor_cool@163.com>
|
||||||
|
Date: Sat, 7 May 2022 14:19:53 +0800
|
||||||
|
Subject: [PATCH] test_no_file
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_cli.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_cli.py b/tests/test_cli.py
|
||||||
|
index 7b42724..316e4e1 100644
|
||||||
|
--- a/tests/test_cli.py
|
||||||
|
+++ b/tests/test_cli.py
|
||||||
|
@@ -54,7 +54,7 @@ class TestConvert(TestCase):
|
||||||
|
message = buffer.read().decode()
|
||||||
|
self.assertIn('usage', message)
|
||||||
|
self.assertIn('underscore-emphasis', message)
|
||||||
|
- self.assertIn('optional arguments:', message)
|
||||||
|
+ self.assertRegex(message,r'option(s|al arguments):')
|
||||||
|
|
||||||
|
def test_parse_file(self):
|
||||||
|
output = parse_from_file(test_md)
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,10 +1,12 @@
|
|||||||
Name: python-m2r
|
Name: python-m2r
|
||||||
Version: 0.1.15
|
Version: 0.1.15
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: A converter for markdown to reStructuredText
|
Summary: A converter for markdown to reStructuredText
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/miyakogi/m2r
|
URL: https://github.com/miyakogi/m2r
|
||||||
Source0: https://github.com/miyakogi/m2r/archive/v%{version}/m2r-%{version}.tar.gz
|
Source0: https://github.com/miyakogi/m2r/archive/v%{version}/m2r-%{version}.tar.gz
|
||||||
|
#https://github.com/miyakogi/m2r/pull/62
|
||||||
|
Patch0: 0001-test_no_file.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -20,7 +22,7 @@ Summary: A converter for markdown to reStructuredText
|
|||||||
The package converts a markdown file including reStructuredText (rst) markups to a valid rST format.
|
The package converts a markdown file including reStructuredText (rst) markups to a valid rST format.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n m2r-%{version}
|
%autosetup -p1 -n m2r-%{version}
|
||||||
rm -rf m2r.egg-info
|
rm -rf m2r.egg-info
|
||||||
sed -i '1{\@^#!/usr/bin/env python@d}' m2r.py
|
sed -i '1{\@^#!/usr/bin/env python@d}' m2r.py
|
||||||
|
|
||||||
@ -40,6 +42,9 @@ PYTHONPATH=$(pwd) %{__python3} setup.py test -s tests
|
|||||||
%exclude %{python3_sitelib}/tests
|
%exclude %{python3_sitelib}/tests
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat May 07 2022 yangping <yangping69@h-partners.com> - 0.1.15-5
|
||||||
|
- Fix error caused by options arguments
|
||||||
|
|
||||||
* Mon Oct 12 2020 maminjie <maminjie1@huawei.com> - 0.1.15-4
|
* Mon Oct 12 2020 maminjie <maminjie1@huawei.com> - 0.1.15-4
|
||||||
* Drop python2 support
|
* Drop python2 support
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user