示例#1
0
文件: unit.py 项目: kurtsansom/ats
 def setUp(self):
     argv = "--skip --log ats.log --quiet"
     manager.restart()
     manager.init(argv)
     log.logging = 0
     unglue()
     unstick()
     untack()
示例#2
0
文件: unit.py 项目: kurtsansom/ats
 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)
示例#3
0
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()