[Python-modules-commits] r27416 - in packages/python-crypto/trunk/debian (3 files)

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Thu Jan 23 23:03:57 UTC 2014


    Date: Thursday, January 23, 2014 @ 23:03:56
  Author: sramacher
Revision: 27416

debian/patches/unittest-stream.patch: Fix stream handling in SelfTest.
Otherwise the actual error won't get printed and an unrelated exception
will be thrown.

Added:
  packages/python-crypto/trunk/debian/patches/unittest-stream.patch
Modified:
  packages/python-crypto/trunk/debian/changelog
  packages/python-crypto/trunk/debian/patches/series

Modified: packages/python-crypto/trunk/debian/changelog
===================================================================
--- packages/python-crypto/trunk/debian/changelog	2014-01-23 22:18:33 UTC (rev 27415)
+++ packages/python-crypto/trunk/debian/changelog	2014-01-23 23:03:56 UTC (rev 27416)
@@ -1,4 +1,4 @@
-python-crypto (2.6.1-3) UNRELEASED; urgency=low
+python-crypto (2.6.1-4) UNRELEASED; urgency=low
 
   * debian/control:
     - Fix some mistakes in Description. (Closes: #729241)
@@ -6,8 +6,11 @@
   * debian/watch: Only honor stable releases.
   * debian/{watch,upstream-signing-key.pgp}: Check signature of the orig
     tarball.
+  * debian/patches/unittest-stream.patch: Fix stream handling in SelfTest.
+    Otherwise the actual error won't get printed and an unrelated exception
+    will be thrown.
 
- -- Sebastian Ramacher <sramacher at debian.org>  Mon, 11 Nov 2013 01:04:36 +0100
+ -- Sebastian Ramacher <sramacher at debian.org>  Thu, 23 Jan 2014 23:59:02 +0100
 
 python-crypto (2.6.1-2) unstable; urgency=low
 

Modified: packages/python-crypto/trunk/debian/patches/series
===================================================================
--- packages/python-crypto/trunk/debian/patches/series	2014-01-23 22:18:33 UTC (rev 27415)
+++ packages/python-crypto/trunk/debian/patches/series	2014-01-23 23:03:56 UTC (rev 27416)
@@ -6,3 +6,4 @@
 fix-py3-errors.patch
 fix-except-shadows-builtin.patch
 multiprocessing-test.patch
+unittest-stream.patch

Added: packages/python-crypto/trunk/debian/patches/unittest-stream.patch
===================================================================
--- packages/python-crypto/trunk/debian/patches/unittest-stream.patch	                        (rev 0)
+++ packages/python-crypto/trunk/debian/patches/unittest-stream.patch	2014-01-23 23:03:56 UTC (rev 27416)
@@ -0,0 +1,25 @@
+Description: Fix handling of the output stream in SelfTest
+Author: Sebastian Ramacher <sramacher at debian.org>
+Last-Update: 2014-01-23
+Forwarded: https://github.com/dlitz/pycrypto/pull/39
+Applied-Upstream: yes
+
+diff --git a/lib/Crypto/SelfTest/__init__.py b/lib/Crypto/SelfTest/__init__.py
+index 40b3969..7110cd2 100644
+--- a/lib/Crypto/SelfTest/__init__.py
++++ b/lib/Crypto/SelfTest/__init__.py
+@@ -66,11 +66,13 @@ def run(module=None, verbosity=0, stream=None, tests=None, config=None, **kwargs
+             raise ValueError("'module' and 'tests' arguments are mutually exclusive")
+     if stream is None:
+         kwargs['stream'] = StringIO()
++    else:
++        kwargs['stream'] = stream
+     runner = unittest.TextTestRunner(verbosity=verbosity, **kwargs)
+     result = runner.run(suite)
+     if not result.wasSuccessful():
+         if stream is None:
+-            sys.stderr.write(stream.getvalue())
++            sys.stderr.write(kwargs['stream'].getvalue())
+         raise SelfTestError("Self-test failed", result)
+     return result
+ 




More information about the Python-modules-commits mailing list