summaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 41e22353..fd8c4cd7 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -76,3 +76,15 @@ class SSHClient(object):
elif method == 'get':
ftp.get(source, dest)
ftp.close()
+
+def run_async(func):
+ from threading import Thread
+ from functools import wraps
+
+ @wraps(func)
+ def async_func(*args, **kwargs):
+ thread = Thread(target=func, args=args, kwargs=kwargs)
+ thread.start()
+ return thread
+
+ return async_func