[Python-modules-commits] [python-gnupg] 07/09: Skip tests that require internet access
Elena Grandi
valhalla-guest at moszumanska.debian.org
Sat Jul 22 16:07:10 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 e9d26814c64d0bedb5021e37247d07741bb04515
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 | 8 ++++----
test_gnupg.py | 1 +
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/gnupg.py b/gnupg.py
index 57f23bc..8f4b856 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,8 @@ 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