Hello community,
here is the log from the commit of package python-testfixtures for
openSUSE:Factory checked in at 2020-05-20 18:36:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-testfixtures (Old)
and /work/SRC/openSUSE:Factory/.python-testfixtures.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-testfixtures"
Wed May 20 18:36:19 2020 rev:12 rq:807182 version:6.14.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-testfixtures/python-testfixtures.changes
2020-03-27 00:21:40.156146535 +0100
+++
/work/SRC/openSUSE:Factory/.python-testfixtures.new.2738/python-testfixtures.changes
2020-05-20 18:36:23.224095502 +0200
@@ -1,0 +2,8 @@
+Tue May 19 10:20:08 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Add patch to fix build with python 3.8.3:
+ * python383.patch
+- Update to 6.14.1:
+ * Fix bugs in comparison of :func:`~unittest.mock.call` objects where the
:func:`repr` of the :func:`~unittest.mock.call` arguments were the same even
when their attributes were not.
+
+-------------------------------------------------------------------
Old:
----
testfixtures-6.14.0.tar.gz
New:
----
python383.patch
testfixtures-6.14.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-testfixtures.spec ++++++
--- /var/tmp/diff_new_pack.hobDIO/_old 2020-05-20 18:36:24.248097649 +0200
+++ /var/tmp/diff_new_pack.hobDIO/_new 2020-05-20 18:36:24.252097657 +0200
@@ -19,13 +19,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-testfixtures
-Version: 6.14.0
+Version: 6.14.1
Release: 0
Summary: A collection of helpers and mock objects for unit tests and
doc tests
License: MIT
URL: https://github.com/Simplistix/testfixtures
Source:
https://files.pythonhosted.org/packages/source/t/testfixtures/testfixtures-%{version}.tar.gz
-# Test case dependencies
+Patch0: python383.patch
BuildRequires: %{python_module Django}
BuildRequires: %{python_module Twisted}
BuildRequires: %{python_module pytest >= 3.6}
@@ -58,6 +58,7 @@
%prep
%setup -q -n testfixtures-%{version}
+%patch0 -p1
chmod a-x docs/*.txt
%build
++++++ python383.patch ++++++
>From 9684e9816c39377f5cc08819dee711b2255fb2d3 Mon Sep 17 00:00:00 2001
From: Chris Withers <[email protected]>
Date: Sun, 17 May 2020 08:01:57 +0100
Subject: [PATCH] fix for python 3.8.3
---
testfixtures/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testfixtures/utils.py b/testfixtures/utils.py
index 9584db3..00aa9da 100644
--- a/testfixtures/utils.py
+++ b/testfixtures/utils.py
@@ -68,7 +68,7 @@ def patched(*args, **keywargs):
to_add = len(getargspec(func).args[len(args):])
added = 0
- exc_info = tuple()
+ exc_info = (None, None, None)
try:
for patching in patched.patchings:
arg = patching.__enter__()
++++++ testfixtures-6.14.0.tar.gz -> testfixtures-6.14.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.14.0/CHANGELOG.rst
new/testfixtures-6.14.1/CHANGELOG.rst
--- old/testfixtures-6.14.0/CHANGELOG.rst 2020-02-24 16:21:42.000000000
+0100
+++ new/testfixtures-6.14.1/CHANGELOG.rst 2020-04-20 14:27:37.000000000
+0200
@@ -3,6 +3,12 @@
.. currentmodule:: testfixtures
+6.14.1 (20 Apr 2020)
+--------------------
+
+- Fix bugs in comparison of :func:`~unittest.mock.call` objects where the
:func:`repr` of the
+ :func:`~unittest.mock.call` arguments were the same even when their
attributes were not.
+
6.14.0 (24 Feb 2020)
--------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.14.0/LICENSE.txt
new/testfixtures-6.14.1/LICENSE.txt
--- old/testfixtures-6.14.0/LICENSE.txt 2020-02-24 16:21:42.000000000 +0100
+++ new/testfixtures-6.14.1/LICENSE.txt 2020-04-20 14:27:37.000000000 +0200
@@ -1,5 +1,5 @@
Copyright (c) 2008-2015 Simplistix Ltd
-Copyright (c) 2015-2019 Chris Withers
+Copyright (c) 2015-2020 Chris Withers
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.14.0/PKG-INFO
new/testfixtures-6.14.1/PKG-INFO
--- old/testfixtures-6.14.0/PKG-INFO 2020-02-24 16:21:45.000000000 +0100
+++ new/testfixtures-6.14.1/PKG-INFO 2020-04-20 14:27:41.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: testfixtures
-Version: 6.14.0
+Version: 6.14.1
Summary: A collection of helpers and mock objects for unit tests and doc tests.
Home-page: https://github.com/Simplistix/testfixtures
Author: Chris Withers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.14.0/docs/development.txt
new/testfixtures-6.14.1/docs/development.txt
--- old/testfixtures-6.14.0/docs/development.txt 2020-02-24
16:21:42.000000000 +0100
+++ new/testfixtures-6.14.1/docs/development.txt 2020-04-20
14:27:37.000000000 +0200
@@ -3,15 +3,6 @@
.. highlight:: bash
-This package is developed using continuous integration which can be
-found here:
-
-https://travis-ci.org/Simplistix/testfixtures
-
-The latest development version of the documentation can be found here:
-
-http://testfixtures.readthedocs.org/en/latest/
-
If you wish to contribute to this project, then you should fork the
repository found here:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.14.0/setup.py
new/testfixtures-6.14.1/setup.py
--- old/testfixtures-6.14.0/setup.py 2020-02-24 16:21:42.000000000 +0100
+++ new/testfixtures-6.14.1/setup.py 2020-04-20 14:27:37.000000000 +0200
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2014 Simplistix Ltd, 2015-2019 Chris Withers
+# Copyright (c) 2008-2014 Simplistix Ltd, 2015-2020 Chris Withers
# See license.txt for license details.
import os
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.14.0/testfixtures/comparison.py
new/testfixtures-6.14.1/testfixtures/comparison.py
--- old/testfixtures-6.14.0/testfixtures/comparison.py 2020-02-24
16:21:42.000000000 +0100
+++ new/testfixtures-6.14.1/testfixtures/comparison.py 2020-04-20
14:27:37.000000000 +0200
@@ -377,9 +377,23 @@
x_name, x_args, x_kw = extract(x)
y_name, y_args, y_kw = extract(y)
+
if x_name == y_name and x_args == y_args and x_kw == y_kw:
return compare_call(getattr(x, parent_name), getattr(y, parent_name),
context)
- return compare_text(repr(x), repr(y), context)
+
+ if repr(x) != repr(y):
+ return compare_text(repr(x), repr(y), context)
+
+ different = (
+ context.different(x_name, y_name, ' function name') or
+ context.different(x_args, y_args, ' args') or
+ context.different(x_kw, y_kw, ' kw')
+ )
+ if not different:
+ return
+
+ return 'mock.call not as expected:'
+
def compare_partial(x, y, context):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/testfixtures-6.14.0/testfixtures/tests/test_compare.py
new/testfixtures-6.14.1/testfixtures/tests/test_compare.py
--- old/testfixtures-6.14.0/testfixtures/tests/test_compare.py 2020-02-24
16:21:42.000000000 +0100
+++ new/testfixtures-6.14.1/testfixtures/tests/test_compare.py 2020-04-20
14:27:37.000000000 +0200
@@ -1554,45 +1554,63 @@
"'call(1)' != 'call(2)'"
)
- def test_compare_arbitrary_nested_same(self):
- compare(SampleClassA([SampleClassB()]),
- SampleClassA([SampleClassB()]))
+ def test_calls_args_different_but_same_repr(self):
+ class Annoying(object):
+ def __init__(self, x):
+ self.x = x
+ def __repr__(self):
+ return '<annoying>'
+ m1 = Mock()
+ m2 = Mock()
+ m1.foo(Annoying(1))
+ m2.foo(Annoying(3))
- def test_compare_different_vars(self):
- obj1 = SampleClassB(1)
- obj1.same = 42
- obj1.foo = '1'
- obj2 = SampleClassB(2)
- obj2.same = 42
- obj2.bar = '2'
self.check_raises(
- obj1, obj2,
- "SampleClassB not as expected:\n"
- "\n"
- "attributes same:\n"
- "['same']\n"
- "\n"
- 'attributes in first but not second:\n'
- "'foo': '1'\n"
- "\n"
- 'attributes in second but not first:\n'
- "'bar': '2'\n"
+ m1.mock_calls,
+ m2.mock_calls,
+ 'sequence not as expected:\n'
'\n'
- 'attributes differ:\n'
- "'args': (1,) != (2,)\n"
+ 'same:\n'
+ '[]\n'
+ '\n'
+ 'first:\n'
+ '[call.foo(<annoying>)]\n'
+ '\n'
+ 'second:\n'
+ '[call.foo(<annoying>)]\n'
'\n'
- "While comparing .args: sequence not as expected:\n"
+ 'While comparing [0]: mock.call not as expected:\n'
+ '\n'
+ 'While comparing [0] args: sequence not as expected:\n'
'\n'
'same:\n'
'()\n'
'\n'
'first:\n'
- '(1,)\n'
+ '(<annoying>,)\n'
'\n'
'second:\n'
- '(2,)'
+ '(<annoying>,)\n'
+ '\n'
+ 'While comparing [0] args[0]: Annoying not as expected:\n'
+ '\n'
+ 'attributes differ:\n'
+ "'x': 1 != 3"
)
+ def test_calls_nested_equal_sub_attributes(self):
+ class Annoying(object):
+ def __init__(self, x):
+ self.x = x
+ def __repr__(self):
+ return '<annoying>'
+ m1 = Mock()
+ m2 = Mock()
+ m1.foo(x=[Annoying(1)])
+ m2.foo(x=[Annoying(1)])
+
+ compare(m1.mock_calls, m2.mock_calls)
+
def test_compare_arbitrary_nested_diff(self):
class OurClass:
def __init__(self, *args):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.14.0/testfixtures/version.txt
new/testfixtures-6.14.1/testfixtures/version.txt
--- old/testfixtures-6.14.0/testfixtures/version.txt 2020-02-24
16:21:42.000000000 +0100
+++ new/testfixtures-6.14.1/testfixtures/version.txt 2020-04-20
14:27:37.000000000 +0200
@@ -1 +1 @@
-6.14.0
+6.14.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.14.0/testfixtures.egg-info/PKG-INFO
new/testfixtures-6.14.1/testfixtures.egg-info/PKG-INFO
--- old/testfixtures-6.14.0/testfixtures.egg-info/PKG-INFO 2020-02-24
16:21:45.000000000 +0100
+++ new/testfixtures-6.14.1/testfixtures.egg-info/PKG-INFO 2020-04-20
14:27:41.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: testfixtures
-Version: 6.14.0
+Version: 6.14.1
Summary: A collection of helpers and mock objects for unit tests and doc tests.
Home-page: https://github.com/Simplistix/testfixtures
Author: Chris Withers