[Pkg-privacy-commits] [monkeysign] 08/08: add debug code for test_import_fail() failure

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:34:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch dev/python-gnupg
in repository monkeysign.

commit 0066d682a7ec3b73c925c3cc27ef1a13c4b548c2
Author: Antoine Beaupré <anarcat at koumbit.org>
Date:   Sat Aug 30 16:04:46 2014 -0700

    add debug code for test_import_fail() failure
    
    it fails when more than one tests are ran for some reason
---
 tests/test_gpg.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/test_gpg.py b/tests/test_gpg.py
index 95848e2..eb79ac1 100755
--- a/tests/test_gpg.py
+++ b/tests/test_gpg.py
@@ -138,8 +138,14 @@ class TestKeyringBasics(TestKeyringBase):
         self.assertGreater(len(pubkeys), 0)
 
     def test_import_fail(self):
-        """test that import_keys() throws an error on wrong data"""
-        self.assertFalse(self.gpg.import_keys('THIS IS NOT A PUBLIC KEY'))
+        """test that import_keys() throws an error on wrong data
+
+        XXX: this fails when more than one tests are ran, for an
+        unknown reason"""
+        res = self.gpg.import_keys('THIS IS NOT A PUBLIC KEY')
+        if res:
+            print "unexpected fingerprints: %s, counts: %s" % (res.fingerprints, res.counts)
+        self.assertFalse(res)
 
     def test_export(self):
         """test that we can export data similar to what we import

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/monkeysign.git



More information about the Pkg-privacy-commits mailing list