[packages/python-testtools] - added tests-nosource patch (fix tests without modules source available)

qboosh qboosh at pld-linux.org
Fri Jan 10 17:25:41 CET 2020


commit ecce750f78064b47d2c6db7d2f6ce592fd187dac
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jan 10 17:25:40 2020 +0100

    - added tests-nosource patch (fix tests without modules source available)

 python-testtools-tests-nosource.patch | 15 +++++++++++++++
 python-testtools.spec                 |  2 ++
 2 files changed, 17 insertions(+)
---
diff --git a/python-testtools.spec b/python-testtools.spec
index f1d6084..807b2ad 100644
--- a/python-testtools.spec
+++ b/python-testtools.spec
@@ -15,6 +15,7 @@ Group:		Development/Tools
 #Source0Download: https://pypi.python.org/pypi/testtools
 Source0:	https://pypi.python.org/packages/source/t/testtools/testtools-%{version}.tar.gz
 # Source0-md5:	0f0feb915497816cb99e39437494217e
+Patch0:		%{name}-tests-nosource.patch
 URL:		https://github.com/testing-cabal/testtools
 %if %{with python2}
 BuildRequires:	python-devel >= 1:2.6
@@ -84,6 +85,7 @@ Dokumentacja HTML do pakietu %{name}.
 
 %prep
 %setup -q -n testtools-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
diff --git a/python-testtools-tests-nosource.patch b/python-testtools-tests-nosource.patch
new file mode 100644
index 0000000..0e9bad5
--- /dev/null
+++ b/python-testtools-tests-nosource.patch
@@ -0,0 +1,15 @@
+--- testtools-2.3.0/testtools/tests/test_run.py.orig	2018-07-26 18:36:38.072223680 +0200
++++ testtools-2.3.0/testtools/tests/test_run.py	2018-07-26 18:56:54.098876462 +0200
+@@ -204,10 +204,8 @@
+ unittest2.loader._FailedTest.runexample
+ Failed to import test module: runexample
+ Traceback (most recent call last):
+-  File ".../loader.py", line ..., in _find_test_path
+-    package = self._get_module_from_name(name)
+-  File ".../loader.py", line ..., in _get_module_from_name
+-    __import__(name)
++  File ".../loader.py", line ..., in _find_test_path...
++  File ".../loader.py", line ..., in _get_module_from_name...
+   File ".../runexample/__init__.py", line 1
+     class not in
+ ...^...
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-testtools.git/commitdiff/ecce750f78064b47d2c6db7d2f6ce592fd187dac



More information about the pld-cvs-commit mailing list