diff options
Diffstat (limited to 'tests/helper/Stubs.py')
-rw-r--r-- | tests/helper/Stubs.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/helper/Stubs.py b/tests/helper/Stubs.py index cfa5d6fdb..ade15f0c4 100644 --- a/tests/helper/Stubs.py +++ b/tests/helper/Stubs.py @@ -3,6 +3,7 @@ import sys from os.path import abspath, dirname, join from time import strftime +from traceback import format_exc sys.path.append(abspath(join(dirname(__file__), "..", "..", "module", "lib"))) sys.path.append(abspath(join(dirname(__file__), "..", ".."))) @@ -87,6 +88,9 @@ class Core: def getPackage(self, id): return PyPackage(self, 0, "tmp", "tmp", "", "", 0, 0) + + def print_exc(self): + log(ERROR, format_exc()) class NoopClass: @@ -115,4 +119,4 @@ class Thread(BaseThread): __builtin__._ = lambda x: x __builtin__.pypath = abspath(join(dirname(__file__), "..", "..")) __builtin__.hookManager = NoopClass() -__builtin__.pyreq = None
\ No newline at end of file +__builtin__.pyreq = None |