summaryrefslogtreecommitdiff
path: root/tests/test_bio_membuf.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2016-12-06 14:37:39 +0100
committerMatěj Cepl <mcepl@cepl.eu>2016-12-13 17:49:15 +0100
commit15700be1fb95a735c571b191692848b462b2607a (patch)
tree862c88478ba60b7fbe8a012593569f7ebc7a2e8d /tests/test_bio_membuf.py
parent11cb2ee35cf724127c7975f065ebf656d9cd5bea (diff)
downloadm2crypto-15700be1fb95a735c571b191692848b462b2607a.tar.gz
Fix tests.test_bio_membuf.time_limit.
Diffstat (limited to 'tests/test_bio_membuf.py')
-rw-r--r--tests/test_bio_membuf.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_bio_membuf.py b/tests/test_bio_membuf.py
index 4abdc73..00a24ca 100644
--- a/tests/test_bio_membuf.py
+++ b/tests/test_bio_membuf.py
@@ -12,9 +12,11 @@ except ImportError:
from M2Crypto.BIO import MemoryBuffer
+
class TimeLimitExpired(Exception):
pass
+
def time_limit(timeout, func, exc_msg, *args, **kwargs):
class FuncProc(multiprocessing.Process):
def __init__(self):
@@ -22,7 +24,7 @@ def time_limit(timeout, func, exc_msg, *args, **kwargs):
self.result = None
def run(self):
- self.result = func(args, kwargs)
+ self.result = func(*args, **kwargs)
it = FuncProc()
it.start()
@@ -33,6 +35,7 @@ def time_limit(timeout, func, exc_msg, *args, **kwargs):
else:
return it.result
+
class MemoryBufferTestCase(unittest.TestCase):
def setUp(self):