[Python-modules-commits] [python-gnupg] 03/09: Skip tests that require internet access

Elena Grandi valhalla-guest at moszumanska.debian.org
Sat Jul 22 16:07:09 UTC 2017


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

valhalla-guest pushed a commit to branch master
in repository python-gnupg.

commit e3a8d8ffddfeebc2089ef50ff85001622e70b0e7
Author: Elena Grandi <elena.valhalla at gmail.com>
Date:   Thu Oct 8 12:11:21 2015 -0700

    Skip tests that require internet access
    
    Forwarded: not-needed
    Patch-Name: skip_network_needing_test.patch
---
 gnupg.py      | 9 +++++----
 test_gnupg.py | 1 +
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnupg.py b/gnupg.py
index 57f23bc..b7994ad 100644
--- a/gnupg.py
+++ b/gnupg.py
@@ -1062,8 +1062,8 @@ class GPG(object):
         >>> GPGBINARY = os.environ.get('GPGBINARY', 'gpg')
         >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome="keys")
         >>> os.chmod('keys', 0x1C0)
-        >>> result = gpg.recv_keys('pgp.mit.edu', '92905378')
-        >>> assert result
+        >>> result = gpg.recv_keys('pgp.mit.edu', '92905378')  # doctest: +SKIP
+        >>> assert result  # doctest: +SKIP
 
         """
         result = self.result_map['import'](self)
@@ -1252,8 +1252,9 @@ class GPG(object):
         >>> GPGBINARY = os.environ.get('GPGBINARY', 'gpg')
         >>> gpg = GPG(gpgbinary=GPGBINARY, gnupghome='keys')
         >>> os.chmod('keys', 0x1C0)
-        >>> result = gpg.search_keys('<vinay_sajip at hotmail.com>')
-        >>> assert result, 'Failed using default keyserver'
+        >>> result = gpg.search_keys('<vinay_sajip at hotmail.com>')  # doctest: +SKIP
+        >>> assert result, 'Failed using default keyserver'  # doctest:
+        +SKIP
         >>> #keyserver = 'keyserver.ubuntu.com'
         >>> #result = gpg.search_keys('<vinay_sajip at hotmail.com>', keyserver)
         >>> #assert result, 'Failed using keyserver.ubuntu.com'
diff --git a/test_gnupg.py b/test_gnupg.py
index 1fb7a5c..7e3bca0 100644
--- a/test_gnupg.py
+++ b/test_gnupg.py
@@ -761,6 +761,7 @@ class GPGTestCase(unittest.TestCase):
         logger.debug("test_filename_with_spaces ends")
 
     #@skipIf(os.name == 'nt', 'Test not suitable for Windows')
+    @unittest.skip('requires network')
     def test_search_keys(self):
         "Test that searching for keys works"
         r = self.gpg.search_keys('<vinay_sajip at hotmail.com>')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-gnupg.git



More information about the Python-modules-commits mailing list