Expose exception_from_error_queue in the most inelegant way; use this in the base TestCase to make sure no tests leave garbage errors lying around
diff --git a/test/util.py b/test/util.py
index fdc9348..3d47c28 100644
--- a/test/util.py
+++ b/test/util.py
@@ -30,7 +30,13 @@
shutil.rmtree(temp)
elif os.path.exists(temp):
os.unlink(temp)
-
+ from OpenSSL.crypto import Error, _exception_from_error_queue
+ try:
+ _exception_from_error_queue()
+ except Error, e:
+ if e.args != ([],):
+ self.fail("Left over errors in OpenSSL error queue: " + repr(e))
+
def failUnlessIdentical(self, first, second, msg=None):
"""