Hello community,
here is the log from the commit of package python-testfixtures for
openSUSE:Factory checked in at 2019-07-22 17:19:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-testfixtures (Old)
and /work/SRC/openSUSE:Factory/.python-testfixtures.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-testfixtures"
Mon Jul 22 17:19:50 2019 rev:10 rq:717575 version:6.10.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-testfixtures/python-testfixtures.changes
2019-06-18 14:58:11.533336496 +0200
+++
/work/SRC/openSUSE:Factory/.python-testfixtures.new.4126/python-testfixtures.changes
2019-07-22 17:19:51.969903066 +0200
@@ -1,0 +2,6 @@
+Mon Jul 22 12:42:25 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 6.10.0:
+ * Better feedback where objects do not :func:`compare` equal but do have the
same representation.
+
+-------------------------------------------------------------------
Old:
----
testfixtures-6.9.0.tar.gz
New:
----
testfixtures-6.10.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-testfixtures.spec ++++++
--- /var/tmp/diff_new_pack.mokiGl/_old 2019-07-22 17:19:52.581902899 +0200
+++ /var/tmp/diff_new_pack.mokiGl/_new 2019-07-22 17:19:52.585902898 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-testfixtures
-Version: 6.9.0
+Version: 6.10.0
Release: 0
Summary: A collection of helpers and mock objects for unit tests and
doc tests
License: MIT
++++++ testfixtures-6.9.0.tar.gz -> testfixtures-6.10.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.9.0/CHANGELOG.rst
new/testfixtures-6.10.0/CHANGELOG.rst
--- old/testfixtures-6.9.0/CHANGELOG.rst 2019-06-10 17:46:54.000000000
+0200
+++ new/testfixtures-6.10.0/CHANGELOG.rst 2019-06-19 08:07:46.000000000
+0200
@@ -3,6 +3,12 @@
.. currentmodule:: testfixtures
+6.10.0 (19 Jun 2019)
+-------------------
+
+- Better feedback where objects do not :func:`compare` equal but do have the
same
+ representation.
+
6.9.0 (10 Jun 2019)
-------------------
@@ -10,9 +16,9 @@
- Improve :doc:`mocking <mocking>` docs.
-- Add ``strip_whitespace`` option to :class:`OutputCapture`.
+- Added ``strip_whitespace`` option to :class:`OutputCapture`.
-- When ``separate`` is used with :class:`OutputCapture`, differences in
``stdout` and ``stderr``
+- When ``separate`` is used with :class:`OutputCapture`, differences in
``stdout`` and ``stderr``
are now given in the same :class:`AssertionError`.
- :class:`ShouldRaise` no longer catches exceptions that are not of the
required type.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.9.0/PKG-INFO
new/testfixtures-6.10.0/PKG-INFO
--- old/testfixtures-6.9.0/PKG-INFO 2019-06-10 17:46:57.000000000 +0200
+++ new/testfixtures-6.10.0/PKG-INFO 2019-06-19 08:07:50.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: testfixtures
-Version: 6.9.0
+Version: 6.10.0
Summary: A collection of helpers and mock objects for unit tests and doc tests.
Home-page: https://github.com/Simplistix/testfixtures
Author: Chris Withers
@@ -75,6 +75,6 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Provides-Extra: test
Provides-Extra: docs
Provides-Extra: build
-Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.9.0/testfixtures/comparison.py
new/testfixtures-6.10.0/testfixtures/comparison.py
--- old/testfixtures-6.9.0/testfixtures/comparison.py 2019-06-10
17:46:54.000000000 +0200
+++ new/testfixtures-6.10.0/testfixtures/comparison.py 2019-06-19
08:07:46.000000000 +0200
@@ -16,7 +16,19 @@
Returns a very simple textual difference between the two supplied objects.
"""
if x != y:
- return context.label('x', repr(x)) + ' != ' + context.label('y',
repr(y))
+ repr_x = repr(x)
+ repr_y = repr(y)
+ if repr_x == repr_y:
+ x_attrs = _extract_attrs(x)
+ y_attrs = _extract_attrs(y)
+ diff = _compare_mapping(x_attrs, y_attrs, context, x,
+ 'attributes ', '.%s')
+ if not diff:
+ return 'Both %s and %s appear as %r, but are not equal!' % (
+ context.x_label or 'x', context.y_label or 'y', repr_x
+ )
+ return diff
+ return context.label('x', repr_x) + ' != ' + context.label('y', repr_y)
def _extract_attrs(obj, ignore=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/testfixtures-6.9.0/testfixtures/tests/test_compare.py
new/testfixtures-6.10.0/testfixtures/tests/test_compare.py
--- old/testfixtures-6.9.0/testfixtures/tests/test_compare.py 2019-06-10
17:46:54.000000000 +0200
+++ new/testfixtures-6.10.0/testfixtures/tests/test_compare.py 2019-06-19
08:07:46.000000000 +0200
@@ -1699,6 +1699,26 @@
compare(partial(foo, 1, x=2), partial(foo, 1, x=2))
+ def test_repr_and_attributes_equal(self):
+
+ class Wut(object):
+ def __repr__(self):
+ return 'Wut'
+ def __eq__(self, other):
+ return False
+
+ self.check_raises(
+ Wut(),
+ Wut(),
+ "Both x and y appear as 'Wut', but are not equal!"
+ )
+
+ self.check_raises(
+ expected=Wut(),
+ actual=Wut(),
+ message="Both expected and actual appear as 'Wut', but are not
equal!"
+ )
+
class TestIgnore(CompareHelper):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/testfixtures-6.9.0/testfixtures/tests/test_should_raise.py
new/testfixtures-6.10.0/testfixtures/tests/test_should_raise.py
--- old/testfixtures-6.9.0/testfixtures/tests/test_should_raise.py
2019-06-10 17:46:54.000000000 +0200
+++ new/testfixtures-6.10.0/testfixtures/tests/test_should_raise.py
2019-06-19 08:07:46.000000000 +0200
@@ -295,3 +295,33 @@
):
with ShouldRaise(AnnoyingException(other='bar')):
raise AnnoyingException(other='baz')
+
+ def test_identical_reprs_but_args_different(self):
+ if PY2:
+ return
+
+ class MessageError(Exception):
+ def __init__(self, message, type=None):
+ self.message = message
+ self.type = type
+ def __repr__(self):
+ return 'MessageError({!r}, {!r})'.format(self.message,
self.type)
+
+ with ShouldAssert(
+ "MessageError not as expected:\n\n"
+ 'attributes same:\n'
+ "['message', 'type']\n\n"
+ "attributes differ:\n"
+ "'args': ('foo',) (expected) != ('foo', None) (raised)\n\n"
+ "While comparing .args: sequence not as expected:\n\n"
+ "same:\n"
+ "('foo',)\n\n"
+ "expected:\n"
+ "()\n\n"
+ "raised:\n"
+ "(None,)"
+ ):
+ with ShouldRaise(MessageError('foo')):
+ raise MessageError('foo', None)
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.9.0/testfixtures/version.txt
new/testfixtures-6.10.0/testfixtures/version.txt
--- old/testfixtures-6.9.0/testfixtures/version.txt 2019-06-10
17:46:54.000000000 +0200
+++ new/testfixtures-6.10.0/testfixtures/version.txt 2019-06-19
08:07:46.000000000 +0200
@@ -1 +1 @@
-6.9.0
+6.10.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.9.0/testfixtures.egg-info/PKG-INFO
new/testfixtures-6.10.0/testfixtures.egg-info/PKG-INFO
--- old/testfixtures-6.9.0/testfixtures.egg-info/PKG-INFO 2019-06-10
17:46:57.000000000 +0200
+++ new/testfixtures-6.10.0/testfixtures.egg-info/PKG-INFO 2019-06-19
08:07:50.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: testfixtures
-Version: 6.9.0
+Version: 6.10.0
Summary: A collection of helpers and mock objects for unit tests and doc tests.
Home-page: https://github.com/Simplistix/testfixtures
Author: Chris Withers
@@ -75,6 +75,6 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Provides-Extra: test
Provides-Extra: docs
Provides-Extra: build
-Provides-Extra: test