summaryrefslogtreecommitdiff
path: root/testall.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2013-09-12 10:15:53 -0700
committerLance Stout <lancestout@gmail.com>2013-09-12 10:15:53 -0700
commit07284f380fa0a893a5ef56774fcef71a47851668 (patch)
tree27e815557475b9c8f8edb2c37bb242d3b40143b5 /testall.py
parente60401278f8933211eaac168475a3c332d62531c (diff)
parenta1d988fed5839a0d6f44340ed3dae8496e1b9a58 (diff)
downloadslixmpp-07284f380fa0a893a5ef56774fcef71a47851668.tar.gz
slixmpp-07284f380fa0a893a5ef56774fcef71a47851668.tar.bz2
slixmpp-07284f380fa0a893a5ef56774fcef71a47851668.tar.xz
slixmpp-07284f380fa0a893a5ef56774fcef71a47851668.zip
Merge pull request #207 from spartanbits/pull_request_gevent_check
Pull request gevent check
Diffstat (limited to 'testall.py')
-rwxr-xr-xtestall.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/testall.py b/testall.py
index c9ad5448..2cb6f538 100755
--- a/testall.py
+++ b/testall.py
@@ -1,7 +1,11 @@
#!/usr/bin/env python
-import os
import sys
+if len(sys.argv)>1 and sys.argv[1].lower() == 'gevent':
+ from gevent import monkey
+ monkey.patch_all()
+
+import os
import logging
import unittest
import distutils.core
@@ -57,7 +61,7 @@ class TestCommand(distutils.core.Command):
if __name__ == '__main__':
result = run_tests()
- print("<tests %s ran='%s' errors='%s' fails='%s' success='%s' />" % (
+ print("<tests %s ran='%s' errors='%s' fails='%s' success='%s' gevent_enabled=%s/>" % (
"xmlns='http//andyet.net/protocol/tests'",
result.testsRun, len(result.errors),
- len(result.failures), result.wasSuccessful()))
+ len(result.failures), result.wasSuccessful(),'gevent' in sys.modules))