summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-02-06 10:42:32 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-02-06 10:42:32 +0100
commitb6753b215aae358d23d42fec736b3f865d923b1b (patch)
treece628d36e34b2d7f02603c81059cd91b2542a39b /tests
parentfix in hoster tester (diff)
downloadpyload-b6753b215aae358d23d42fec736b3f865d923b1b.tar.xz
fix in unit test
Diffstat (limited to 'tests')
-rw-r--r--tests/helper/Stubs.py6
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