comparison tests/run.py @ 338:47c0110046dc

tests: silence tests when using run.py
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 15 May 2009 17:24:08 +0200
parents 46e69be8e2c8
children 537de0300510
comparison
equal deleted inserted replaced
337:46e69be8e2c8 338:47c0110046dc
52 kwargs = { 'descriptions': 2 } 52 kwargs = { 'descriptions': 2 }
53 if '-v' in sys.argv: 53 if '-v' in sys.argv:
54 kwargs['descriptions'] = 3 54 kwargs['descriptions'] = 3
55 kwargs['verbosity'] = 2 55 kwargs['verbosity'] = 2
56 56
57 # silence output when running outside nose
58 sys.stdout = os.tmpfile()
59
57 runner = unittest.TextTestRunner(**kwargs) 60 runner = unittest.TextTestRunner(**kwargs)
58 runner.run(suite()) 61 runner.run(suite())