mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
supybot-test: Return appropriate status code.
This commit is contained in:
parent
de4f1b34d2
commit
408f6e2288
@ -31,6 +31,7 @@
|
||||
###
|
||||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import shutil
|
||||
started = time.time()
|
||||
@ -200,9 +201,14 @@ if __name__ == '__main__':
|
||||
shutil.rmtree(conf.supybot.directories.log())
|
||||
shutil.rmtree(conf.supybot.directories.conf())
|
||||
shutil.rmtree(conf.supybot.directories.data())
|
||||
runner.run(suite)
|
||||
result = runner.run(suite)
|
||||
|
||||
if hasattr(unittest, 'asserts'):
|
||||
print 'Total asserts: %s' % unittest.asserts
|
||||
|
||||
if result.wasSuccessful():
|
||||
sys.exit(0)
|
||||
else:
|
||||
sys.exit(1)
|
||||
|
||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||
|
Loading…
Reference in New Issue
Block a user