[packages/python-testtools] - updated to 2.4.0 - updated deps patch - removed obsolete py37 patch
qboosh
qboosh at pld-linux.org
Thu Mar 17 21:52:12 CET 2022
commit 65dcb6f7540bb78c97fceb98ca77ed86b64982c5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Mar 17 21:54:21 2022 +0100
- updated to 2.4.0
- updated deps patch
- removed obsolete py37 patch
python-testtools-deps.patch | 8 +++----
python-testtools-py37.patch | 54 ---------------------------------------------
python-testtools.spec | 10 ++++-----
3 files changed, 8 insertions(+), 64 deletions(-)
---
diff --git a/python-testtools.spec b/python-testtools.spec
index f158611..234d51e 100644
--- a/python-testtools.spec
+++ b/python-testtools.spec
@@ -8,17 +8,16 @@
Summary: Extensions to the Python unit testing framework
Summary(pl.UTF-8): Rozszerzenie szkieletu testów jednostkowych Pythona
Name: python-testtools
-Version: 2.3.0
-Release: 4
+# keep 2.4.x here for python2 support
+Version: 2.4.0
+Release: 1
License: MIT
Group: Development/Tools
#Source0Download: https://pypi.org/simple/testtools/
Source0: https://files.pythonhosted.org/packages/source/t/testtools/testtools-%{version}.tar.gz
-# Source0-md5: 0f0feb915497816cb99e39437494217e
+# Source0-md5: e8fc7185b47cfb908c641f8c4b2a6add
Patch0: %{name}-tests-nosource.patch
Patch1: %{name}-deps.patch
-# https://github.com/testing-cabal/testtools/commit/29004731f9c480b7c44a9c2605513d50d372898f.patch
-Patch2: %{name}-py37.patch
URL: https://github.com/testing-cabal/testtools
%if %{with python2}
BuildRequires: python-devel >= 1:2.7
@@ -98,7 +97,6 @@ Dokumentacja HTML do pakietu Pythona testttools.
%setup -q -n testtools-%{version}
%patch0 -p1
%patch1 -p1
-%patch2 -p1
%build
%if %{with python2}
diff --git a/python-testtools-deps.patch b/python-testtools-deps.patch
index 41643ae..096a119 100644
--- a/python-testtools-deps.patch
+++ b/python-testtools-deps.patch
@@ -108,11 +108,11 @@
return TestLoader().loadTestsFromName(__name__)
---- testtools-2.3.0/testtools/tests/test_compat.py.orig 2016-10-22 19:21:40.000000000 +0200
-+++ testtools-2.3.0/testtools/tests/test_compat.py 2018-07-26 18:57:49.558875829 +0200
-@@ -3,7 +3,10 @@
- """Tests for miscellaneous compatibility functions"""
+--- testtools-2.4.0/testtools/tests/test_compat.py.orig 2019-11-28 09:58:29.000000000 +0100
++++ testtools-2.4.0/testtools/tests/test_compat.py 2022-03-17 18:54:23.676536228 +0100
+@@ -4,7 +4,10 @@
+ import ast
import io
-import linecache2 as linecache
+try:
diff --git a/python-testtools-py37.patch b/python-testtools-py37.patch
deleted file mode 100644
index 2241c83..0000000
--- a/python-testtools-py37.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 29004731f9c480b7c44a9c2605513d50d372898f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro at hroncok.cz>
-Date: Thu, 17 May 2018 17:52:26 +0200
-Subject: [PATCH] Fix the tests on Python 3.7
-
-Exception's repr got changed not to include trailing comma
-
-Fixes https://github.com/testing-cabal/testtools/issues/270
----
- .travis.yml | 1 +
- testtools/tests/matchers/test_exception.py | 11 +++++++++--
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/.travis.yml b/.travis.yml
-index 7f1f4db7..784608e0 100644
---- a/.travis.yml
-+++ b/.travis.yml
-@@ -5,6 +5,7 @@ python:
- - "3.4"
- - "3.5"
- - "3.6"
-+ - "3.7-dev"
- - "pypy"
-
- install:
-diff --git a/testtools/tests/matchers/test_exception.py b/testtools/tests/matchers/test_exception.py
-index 6cd80af1..acd39252 100644
---- a/testtools/tests/matchers/test_exception.py
-+++ b/testtools/tests/matchers/test_exception.py
-@@ -32,15 +32,22 @@ class TestMatchesExceptionInstanceInterface(TestCase, TestMatchersInterface):
- matches_matches = [error_foo]
- matches_mismatches = [error_bar, error_base_foo]
-
-+ if sys.version_info >= (3, 7):
-+ # exception's repr has changed
-+ _e = ''
-+ else:
-+ _e = ','
-+
- str_examples = [
-- ("MatchesException(Exception('foo',))",
-+ ("MatchesException(Exception('foo'%s))" % _e,
- MatchesException(Exception('foo')))
- ]
- describe_examples = [
- ("%r is not a %r" % (Exception, ValueError),
- error_base_foo,
- MatchesException(ValueError("foo"))),
-- ("ValueError('bar',) has different arguments to ValueError('foo',).",
-+ ("ValueError('bar'%s) has different arguments to ValueError('foo'%s)."
-+ % (_e, _e),
- error_bar,
- MatchesException(ValueError("foo"))),
- ]
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-testtools.git/commitdiff/65dcb6f7540bb78c97fceb98ca77ed86b64982c5
More information about the pld-cvs-commit
mailing list