mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-10-14 17:59:29 +02:00
supybot-test: Add option --fail-fast.
This commit is contained in:
parent
715f9cd52d
commit
481ffbf797
@ -133,6 +133,8 @@ if __name__ == '__main__':
|
|||||||
parser.add_option('-v', '--verbose', action='count', default=0,
|
parser.add_option('-v', '--verbose', action='count', default=0,
|
||||||
help='Increase verbosity, logging extra information '
|
help='Increase verbosity, logging extra information '
|
||||||
'about each test that runs.')
|
'about each test that runs.')
|
||||||
|
parser.add_option('', '--fail-fast', action='store_true', default=False,
|
||||||
|
help='Stop at first failed test.')
|
||||||
parser.add_option('', '--no-network', action='store_true', default=False,
|
parser.add_option('', '--no-network', action='store_true', default=False,
|
||||||
dest='nonetwork', help='Causes the network-based tests '
|
dest='nonetwork', help='Causes the network-based tests '
|
||||||
'not to run.')
|
'not to run.')
|
||||||
@ -209,7 +211,8 @@ if __name__ == '__main__':
|
|||||||
test.suites.append(load(pluginModule.test))
|
test.suites.append(load(pluginModule.test))
|
||||||
|
|
||||||
suite = unittest.TestSuite(test.suites)
|
suite = unittest.TestSuite(test.suites)
|
||||||
runner = unittest.TextTestRunner(verbosity=2)
|
runner = unittest.TextTestRunner(verbosity=2,
|
||||||
|
failfast=options.fail_fast)
|
||||||
print('Testing began at %s (pid %s)' % (time.ctime(), os.getpid()))
|
print('Testing began at %s (pid %s)' % (time.ctime(), os.getpid()))
|
||||||
if options.clean:
|
if options.clean:
|
||||||
shutil.rmtree(conf.supybot.directories.log())
|
shutil.rmtree(conf.supybot.directories.log())
|
||||||
|
Loading…
Reference in New Issue
Block a user