setLogLevel('warning') to avoid test spam

This commit is contained in:
Bob Lantz
2013-09-17 13:44:42 -07:00
parent b7548e68a8
commit ca5b0c56f0
+2
View File
@@ -11,6 +11,7 @@ import os
import sys
from mininet.util import ensureRoot
from mininet.clean import cleanup
from mininet.log import setLogLevel
def runTests( testDir, verbosity=1 ):
"discover and run all tests in testDir"
@@ -23,6 +24,7 @@ def runTests( testDir, verbosity=1 ):
unittest.TextTestRunner( verbosity=verbosity ).run( testSuite )
if __name__ == '__main__':
setLogLevel( 'warning' )
# get the directory containing example tests
testDir = os.path.dirname( os.path.realpath( __file__ ) )
verbosity = 2 if '-v' in sys.argv else 1