[Python-modules-commits] r21808 - in packages/python-gnupg/trunk/debian (4 files)

valhalla-guest at users.alioth.debian.org valhalla-guest at users.alioth.debian.org
Fri May 18 05:18:24 UTC 2012


    Date: Friday, May 18, 2012 @ 05:18:18
  Author: valhalla-guest
Revision: 21808

Stop ignoring test failures

Added:
  packages/python-gnupg/trunk/debian/patches/allow_test_to_run_under_c_locale.patch
  packages/python-gnupg/trunk/debian/patches/return_nonzero_on_test_failure.patch
Modified:
  packages/python-gnupg/trunk/debian/changelog
  packages/python-gnupg/trunk/debian/patches/series

Modified: packages/python-gnupg/trunk/debian/changelog
===================================================================
--- packages/python-gnupg/trunk/debian/changelog	2012-05-17 22:00:53 UTC (rev 21807)
+++ packages/python-gnupg/trunk/debian/changelog	2012-05-18 05:18:18 UTC (rev 21808)
@@ -1,6 +1,7 @@
 python-gnupg (0.3.0-1) UNRELEASED; urgency=low
 
   * New upstream release
+  * Patched testsuite to return nonzero on failure. Closes #671259
 
  -- Elena Grandi <elena.valhalla at gmail.com>  Thu, 17 May 2012 09:18:35 +0000
 

Added: packages/python-gnupg/trunk/debian/patches/allow_test_to_run_under_c_locale.patch
===================================================================
--- packages/python-gnupg/trunk/debian/patches/allow_test_to_run_under_c_locale.patch	                        (rev 0)
+++ packages/python-gnupg/trunk/debian/patches/allow_test_to_run_under_c_locale.patch	2012-05-18 05:18:18 UTC (rev 21808)
@@ -0,0 +1,31 @@
+Description: Remove non-ascii from test suite to run it under C locale
+ This is a workaround used while waiting for a proper fix by upstream.
+Forwarded: no
+Bug: https://code.google.com/p/python-gnupg/issues/detail?id=50
+Author: Elena Grandi <elena.valhalla at gmail.com>
+--- a/test_gnupg.py
++++ b/test_gnupg.py
+@@ -160,9 +160,9 @@
+         barbara = key.fingerprint
+         gpg = self.gpg
+         if gnupg._py3k:
+-            data = 'Hello, André!'
++            data = 'Hello, Andre!'
+         else:
+-            data = unicode('Hello, André', gpg.encoding)
++            data = unicode('Hello, Andre', gpg.encoding)
+         data = data.encode(gpg.encoding)
+         edata = str(gpg.encrypt(data, barbara))
+         self.assertNotEqual(data, edata, "Data must have changed")
+@@ -239,9 +239,9 @@
+         logger.debug("test_signature_verification begins")
+         key = self.generate_key("Andrew", "Able", "alpha.com")
+         if gnupg._py3k:
+-            data = 'Hello, André!'
++            data = 'Hello, Andre!'
+         else:
+-            data = unicode('Hello, André', self.gpg.encoding)
++            data = unicode('Hello, Andre', self.gpg.encoding)
+         data = data.encode(self.gpg.encoding)
+         sig = self.gpg.sign(data, keyid=key.fingerprint, passphrase='bbrown')
+         self.assertFalse(sig, "Bad passphrase should fail")

Added: packages/python-gnupg/trunk/debian/patches/return_nonzero_on_test_failure.patch
===================================================================
--- packages/python-gnupg/trunk/debian/patches/return_nonzero_on_test_failure.patch	                        (rev 0)
+++ packages/python-gnupg/trunk/debian/patches/return_nonzero_on_test_failure.patch	2012-05-18 05:18:18 UTC (rev 21808)
@@ -0,0 +1,16 @@
+Description: Let the test suite return non-zero when a test has failed
+Bug: https://code.google.com/p/python-gnupg/issues/detail?id=51
+Author: Elena Grandi <elena.valhalla at gmail.com>
+--- a/test_gnupg.py
++++ b/test_gnupg.py
+@@ -390,7 +390,9 @@
+ def main():
+     init_logging()
+     tests = suite()
+-    unittest.TextTestRunner(verbosity=2).run(tests)
++    results = unittest.TextTestRunner(verbosity=2).run(tests)
++    if not results.wasSuccessful():
++        sys.exit(1)
+ 
+ 
+ if __name__ == "__main__":

Modified: packages/python-gnupg/trunk/debian/patches/series
===================================================================
--- packages/python-gnupg/trunk/debian/patches/series	2012-05-17 22:00:53 UTC (rev 21807)
+++ packages/python-gnupg/trunk/debian/patches/series	2012-05-18 05:18:18 UTC (rev 21808)
@@ -1 +1,3 @@
 skip_network_needing_test.patch
+return_nonzero_on_test_failure.patch
+allow_test_to_run_under_c_locale.patch




More information about the Python-modules-commits mailing list