Hello community,
here is the log from the commit of package python-testtools for
openSUSE:Factory checked in at 2018-08-15 10:30:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-testtools (Old)
and /work/SRC/openSUSE:Factory/.python-testtools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-testtools"
Wed Aug 15 10:30:55 2018 rev:24 rq:628734 version:2.3.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-testtools/python-testtools-doc.changes
2017-07-11 08:24:57.530950005 +0200
+++
/work/SRC/openSUSE:Factory/.python-testtools.new/python-testtools-doc.changes
2018-08-15 10:31:03.715493720 +0200
@@ -1,0 +2,5 @@
+Sat Aug 11 08:04:56 UTC 2018 - [email protected]
+
+- Really run the tests
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/python-testtools/python-testtools.changes
2018-03-09 10:45:54.344169940 +0100
+++ /work/SRC/openSUSE:Factory/.python-testtools.new/python-testtools.changes
2018-08-15 10:31:05.503496950 +0200
@@ -1,0 +2,6 @@
+Fri Aug 10 11:27:08 UTC 2018 - [email protected]
+
+- Add patch to build with python 3.7:
+ * testtools-py37.patch
+
+-------------------------------------------------------------------
New:
----
testtools-py37.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-testtools-doc.spec ++++++
--- /var/tmp/diff_new_pack.FJWuD8/_old 2018-08-15 10:31:07.687500894 +0200
+++ /var/tmp/diff_new_pack.FJWuD8/_new 2018-08-15 10:31:07.691500902 +0200
@@ -23,21 +23,16 @@
Summary: Documentation for python-testtools
License: MIT
Group: Documentation/HTML
-Url: https://launchpad.net/testtools
-Source:
https://pypi.io/packages/source/t/testtools/testtools-%{version}.tar.gz
+URL: https://launchpad.net/testtools
+Source:
https://files.pythonhosted.org/packages/source/t/testtools/testtools-%{version}.tar.gz
+Patch0: testtools-py37.patch
+BuildRequires: %{python_module testscenarios}
BuildRequires: %{python_module testtools = %{version}}
-BuildRequires: python-rpm-macros
-%if %{with tests}
-# Test requirement
-BuildRequires: %{python_module testscenarios = %{version}}
-BuildRequires: %{python_module unittest2 >= 0.8.0}
-%endif
-# Documentation requirements:
BuildRequires: fdupes
+BuildRequires: python-rpm-macros
BuildRequires: python3-Sphinx
Provides: python2-testtools-doc = %{version}
Provides: python3-testtools-doc = %{version}
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
@@ -45,6 +40,7 @@
%prep
%setup -q -n testtools-%{version}
+%patch0 -p1
%build
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
@@ -54,16 +50,11 @@
cp -r build/sphinx/html %{buildroot}%{_docdir}/python-testtools/
%fdupes %{buildroot}%{_docdir}
-# A build cycle exists between python-extras and python-testtools.
-# Doing the tests in a separate package avoids this cycle.
-%if %{with tests}
%check
-%{python_exec} -m testtools.run testtools.tests.test_suite
-%endif
+%python_exec -m testtools.run testtools.tests.test_suite
%files
-%defattr(-,root,root,-)
-%doc LICENSE
+%license LICENSE
%{_docdir}/python-testtools/
%changelog
++++++ python-testtools.spec ++++++
--- /var/tmp/diff_new_pack.FJWuD8/_old 2018-08-15 10:31:07.707500931 +0200
+++ /var/tmp/diff_new_pack.FJWuD8/_new 2018-08-15 10:31:07.711500938 +0200
@@ -23,9 +23,9 @@
Summary: Extensions to the Python Standard Library Unit Testing
Framework
License: MIT
Group: Development/Languages/Python
-Url: https://launchpad.net/testtools
-Source:
https://pypi.io/packages/source/t/testtools/testtools-%{version}.tar.gz
-BuildRequires: %{python_module devel}
+URL: https://github.com/testing-cabal/testtools
+Source:
https://files.pythonhosted.org/packages/source/t/testtools/testtools-%{version}.tar.gz
+Patch0: testtools-py37.patch
BuildRequires: %{python_module extras >= 1.0.0}
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module setuptools}
@@ -36,12 +36,11 @@
Requires: python-python-mimeparse
Requires: python-six >= 1.4.0
Requires: python-traceback2
-Requires: python-unittest2 >= 1.0.0
+Requires: python-unittest2 >= 1.1.0
+BuildArch: noarch
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
Recommends: python-fixtures >= 1.3.0
%endif
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildArch: noarch
%python_subpackages
%description
@@ -52,6 +51,8 @@
%prep
%setup -q -n testtools-%{version}
+%patch0 -p1
+
%build
%python_build
@@ -61,8 +62,8 @@
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%files %{python_files}
-%defattr(-,root,root,-)
-%doc LICENSE NEWS README.rst
+%license LICENSE
+%doc NEWS README.rst
%{python_sitelib}/testtools
%{python_sitelib}/testtools-%{version}-py*.egg-info
++++++ testtools-py37.patch ++++++
>From 29004731f9c480b7c44a9c2605513d50d372898f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <[email protected]>
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"))),
]