summaryrefslogtreecommitdiff
path: root/tests/test_openpgp.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_openpgp.py')
-rw-r--r--tests/test_openpgp.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_openpgp.py b/tests/test_openpgp.py
index 88b105b..11a6f6e 100644
--- a/tests/test_openpgp.py
+++ b/tests/test_openpgp.py
@@ -222,3 +222,15 @@ class OpenPGPContextManagerTest(unittest.TestCase):
env.verify_file(f)
except gemato.exceptions.OpenPGPNoImplementation as e:
raise unittest.SkipTest(str(e))
+
+ def test_double_close(self):
+ with io.BytesIO(SIGNED_MANIFEST.encode('utf8')) as f:
+ with gemato.openpgp.OpenPGPEnvironment() as env:
+ env.close()
+
+ def test_home_after_close(self):
+ with io.BytesIO(SIGNED_MANIFEST.encode('utf8')) as f:
+ with gemato.openpgp.OpenPGPEnvironment() as env:
+ env.close()
+ with self.assertRaises(RuntimeError):
+ env.home