Added gevent as parameter to testall checking test suite with gevent
enabled/disabled
This commit is contained in:
parent
1a2b404076
commit
b0c50b7a59
1 changed files with 7 additions and 3 deletions
10
testall.py
10
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))
|
||||
|
|
Loading…
Reference in a new issue