def setUp(self): argv = "--skip --log ats.log --quiet" manager.restart() manager.init(argv) log.logging = 0 unglue() unstick() untack()
def testLogVerbosity(self): "Test that a --verbose ends up correctly." argv = "--skip --log ats.log --verbose" manager.init(argv) log.logging = 0 self.assertEqual(manager.verbose, True)
from ats import manager, log def f(m): log('End of the run we started way back at ', m.started) def g(r, m): r['myFavoriteAuthor'] = 'Dickens' r['numberOfTests'] = len(m.testlist) manager.init() manager.onExit(f) manager.onSave(g) manager.filter('level < 20') manager.test(clas='-c 3', level=12) manager.test(clas='-c 4', level=22) manager.main()