diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2017-10-02 15:09:32 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2018-02-06 18:30:32 +0100 |
commit | bc1e2084420f0785e881f443ff2fe4287e6d7d25 (patch) | |
tree | 0e0552def255e5b50862bff57667b4e152f5489c /tests/test_engine.py | |
parent | 1680e7dc9109034258dcacbaa02cfcf3d5b39e4b (diff) | |
download | m2crypto-bc1e2084420f0785e881f443ff2fe4287e6d7d25.tar.gz |
Python 3.6 for reasons I don't understand throws also SystemError.
Diffstat (limited to 'tests/test_engine.py')
-rw-r--r-- | tests/test_engine.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_engine.py b/tests/test_engine.py index 251e1fd..79eaec0 100644 --- a/tests/test_engine.py +++ b/tests/test_engine.py @@ -9,6 +9,7 @@ except ImportError: from M2Crypto import Engine + class EngineTestCase(unittest.TestCase): privkey = 'tests/rsa.priv.pem' @@ -43,8 +44,12 @@ class EngineTestCase(unittest.TestCase): Engine.load_openssl() e = Engine.Engine('openssl') e.set_default() - with self.assertRaises(Engine.EngineError): - e.load_certificate('/dev/null') + try: + with self.assertRaises(Engine.EngineError): + e.load_certificate('/dev/null') + except SystemError: + pass + def suite(): return unittest.makeSuite(EngineTestCase) |