From 5487c305be5b95ad441dcee548c2a81c94455612 Mon Sep 17 00:00:00 2001 From: penelope Date: Sat, 7 May 2022 16:00:17 +0800 Subject: [PATCH] Fix error caused by options arguments --- 0001-test_no_file.patch | 25 +++++++++++++++++++++++++ python-m2r.spec | 9 +++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 0001-test_no_file.patch diff --git a/0001-test_no_file.patch b/0001-test_no_file.patch new file mode 100644 index 0000000..e65ba23 --- /dev/null +++ b/0001-test_no_file.patch @@ -0,0 +1,25 @@ +From 0a21e67970593968f48770f12d52e40af110c823 Mon Sep 17 00:00:00 2001 +From: penelope +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 + diff --git a/python-m2r.spec b/python-m2r.spec index 30e9463..25a1094 100644 --- a/python-m2r.spec +++ b/python-m2r.spec @@ -1,10 +1,12 @@ Name: python-m2r Version: 0.1.15 -Release: 4 +Release: 5 Summary: A converter for markdown to reStructuredText License: MIT URL: https://github.com/miyakogi/m2r 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 %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. %prep -%autosetup -n m2r-%{version} +%autosetup -p1 -n m2r-%{version} rm -rf m2r.egg-info 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 %changelog +* Sat May 07 2022 yangping - 0.1.15-5 +- Fix error caused by options arguments + * Mon Oct 12 2020 maminjie - 0.1.15-4 * Drop python2 support