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