summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Vicente <pedrovfer@gmail.com>2012-11-12 13:48:20 +0100
committerPedro Vicente <pedrovfer@gmail.com>2012-11-12 13:48:20 +0100
commitb0c50b7a59fbc18cb01158fc901013a63ed87b90 (patch)
tree3bb7a5e5cea4f2fcf81202afff116539a694d377
parent1a2b404076a04953e63b8bd120d70e237c185d44 (diff)
downloadslixmpp-b0c50b7a59fbc18cb01158fc901013a63ed87b90.tar.gz
slixmpp-b0c50b7a59fbc18cb01158fc901013a63ed87b90.tar.bz2
slixmpp-b0c50b7a59fbc18cb01158fc901013a63ed87b90.tar.xz
slixmpp-b0c50b7a59fbc18cb01158fc901013a63ed87b90.zip
Added gevent as parameter to testall checking test suite with gevent
enabled/disabled
-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))