Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit python-testfixtures for openSUSE:Factory
Hello community,

here is the log from the commit of package python-testfixtures for
openSUSE:Factory checked in at 2019-04-22 12:26:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-testfixtures (Old)
and /work/SRC/openSUSE:Factory/.python-testfixtures.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-testfixtures"

Mon Apr 22 12:26:23 2019 rev:7 rq:696466 version:6.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-testfixtures/python-testfixtures.changes
2019-03-29 20:42:36.950678340 +0100
+++
/work/SRC/openSUSE:Factory/.python-testfixtures.new.5536/python-testfixtures.changes
2019-04-22 12:26:24.628961347 +0200
@@ -1,0 +2,7 @@
+Thu Apr 18 14:41:23 UTC 2019 - Marketa Calabkova <mcalabkova@xxxxxxxx>
+
+- update to version 6.7.0
+ * Add :meth:`twisted.LogCapture.raise_logged_failure` debugging
+ helper.
+
+-------------------------------------------------------------------

Old:
----
testfixtures-6.6.2.tar.gz

New:
----
testfixtures-6.7.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-testfixtures.spec ++++++
--- /var/tmp/diff_new_pack.nc3rDp/_old 2019-04-22 12:26:25.156961141 +0200
+++ /var/tmp/diff_new_pack.nc3rDp/_new 2019-04-22 12:26:25.156961141 +0200
@@ -18,7 +18,7 @@

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-testfixtures
-Version: 6.6.2
+Version: 6.7.0
Release: 0
Summary: A collection of helpers and mock objects for unit tests and
doc tests
License: MIT

++++++ testfixtures-6.6.2.tar.gz -> testfixtures-6.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.6.2/PKG-INFO
new/testfixtures-6.7.0/PKG-INFO
--- old/testfixtures-6.6.2/PKG-INFO 2019-03-22 08:47:36.000000000 +0100
+++ new/testfixtures-6.7.0/PKG-INFO 2019-04-11 08:03:41.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: testfixtures
-Version: 6.6.2
+Version: 6.7.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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.6.2/docs/changes.txt
new/testfixtures-6.7.0/docs/changes.txt
--- old/testfixtures-6.6.2/docs/changes.txt 2019-03-22 08:47:24.000000000
+0100
+++ new/testfixtures-6.7.0/docs/changes.txt 2019-04-11 08:03:27.000000000
+0200
@@ -3,6 +3,11 @@

.. currentmodule:: testfixtures

+6.7.0 (11 Apr 2019)
+-------------------
+
+- Add :meth:`twisted.LogCapture.raise_logged_failure` debugging helper.
+
6.6.2 (22 Mar 2019)
-------------------

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/testfixtures-6.6.2/testfixtures/tests/test_twisted.py
new/testfixtures-6.7.0/testfixtures/tests/test_twisted.py
--- old/testfixtures-6.6.2/testfixtures/tests/test_twisted.py 2019-03-22
08:47:24.000000000 +0100
+++ new/testfixtures-6.7.0/testfixtures/tests/test_twisted.py 2019-04-11
08:03:27.000000000 +0200
@@ -1,7 +1,8 @@
from twisted.logger import Logger, formatEvent
+from twisted.python.failure import Failure
from twisted.trial.unittest import TestCase

-from testfixtures import compare
+from testfixtures import compare, ShouldRaise
from testfixtures.twisted import LogCapture, INFO

log = Logger()
@@ -52,3 +53,30 @@
log.info("don't look at me...")
capture.check_failure_text(str(TypeError), index=0, attribute='type')
self.flushLoggedErrors()
+ self.flushLoggedErrors()
+
+ def test_raise_logged_failure(self):
+ capture = LogCapture.make(self)
+ try:
+ raise TypeError('all gone wrong')
+ except:
+ log.failure('oh dear')
+ with ShouldRaise(Failure) as s:
+ capture.raise_logged_failure()
+ compare(s.raised.value, expected=TypeError('all gone wrong'))
+ self.flushLoggedErrors()
+
+ def test_raise_later_logged_failure(self):
+ capture = LogCapture.make(self)
+ try:
+ raise ValueError('boom!')
+ except:
+ log.failure('oh dear')
+ try:
+ raise TypeError('all gone wrong')
+ except:
+ log.failure('what now?!')
+ with ShouldRaise(Failure) as s:
+ capture.raise_logged_failure(start_index=1)
+ compare(s.raised.value, expected=TypeError('all gone wrong'))
+ self.flushLoggedErrors()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.6.2/testfixtures/twisted.py
new/testfixtures-6.7.0/testfixtures/twisted.py
--- old/testfixtures-6.6.2/testfixtures/twisted.py 2019-03-22
08:47:24.000000000 +0100
+++ new/testfixtures-6.7.0/testfixtures/twisted.py 2019-04-11
08:03:27.000000000 +0200
@@ -64,6 +64,17 @@
"""
compare(expected,
actual=str(getattr(self.events[index]['log_failure'], attribute)))

+ def raise_logged_failure(self, start_index=0):
+ """
+ A debugging tool that raises the first failure encountered in captured
logging.
+
+ :param start_index: The index into :attr:`events` from where to start
looking for failures.
+ """
+ for event in self.events[start_index:]:
+ failure = event.get('log_failure')
+ if failure:
+ raise failure
+
@classmethod
def make(cls, testcase, **kw):
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.6.2/testfixtures/version.txt
new/testfixtures-6.7.0/testfixtures/version.txt
--- old/testfixtures-6.6.2/testfixtures/version.txt 2019-03-22
08:47:24.000000000 +0100
+++ new/testfixtures-6.7.0/testfixtures/version.txt 2019-04-11
08:03:27.000000000 +0200
@@ -1 +1 @@
-6.6.2
+6.7.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/testfixtures-6.6.2/testfixtures.egg-info/PKG-INFO
new/testfixtures-6.7.0/testfixtures.egg-info/PKG-INFO
--- old/testfixtures-6.6.2/testfixtures.egg-info/PKG-INFO 2019-03-22
08:47:36.000000000 +0100
+++ new/testfixtures-6.7.0/testfixtures.egg-info/PKG-INFO 2019-04-11
08:03:41.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: testfixtures
-Version: 6.6.2
+Version: 6.7.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


< Previous Next >
This Thread
  • No further messages