summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_openpgp.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_openpgp.py b/tests/test_openpgp.py
index ab0a82b..0519ae3 100644
--- a/tests/test_openpgp.py
+++ b/tests/test_openpgp.py
@@ -306,8 +306,10 @@ class OpenPGPCorrectKeyTest(unittest.TestCase):
try:
self.env.import_key(io.BytesIO(PUBLIC_KEY))
except gemato.exceptions.OpenPGPNoImplementation as e:
+ self.env.close()
raise unittest.SkipTest(str(e))
except RuntimeError:
+ self.env.close()
raise unittest.SkipTest('Unable to import OpenPGP key')
def tearDown(self):
@@ -568,8 +570,10 @@ class OpenPGPPrivateKeyTest(unittest.TestCase):
try:
self.env.import_key(io.BytesIO(PRIVATE_KEY))
except gemato.exceptions.OpenPGPNoImplementation as e:
+ self.env.close()
raise unittest.SkipTest(str(e))
except RuntimeError:
+ self.env.close()
raise unittest.SkipTest('Unable to import OpenPGP key')
def tearDown(self):