mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Fix Python 2.6 support.
This commit is contained in:
parent
481ffbf797
commit
7765bf7307
@ -211,8 +211,15 @@ 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)
|
||||||
|
if options.fail_fast:
|
||||||
|
if sys.version_info < (2, 7, 0):
|
||||||
|
print('--fail-fast is not supported on Python 2.6.')
|
||||||
|
sys.exit(1)
|
||||||
|
else:
|
||||||
runner = unittest.TextTestRunner(verbosity=2,
|
runner = unittest.TextTestRunner(verbosity=2,
|
||||||
failfast=options.fail_fast)
|
failfast=True)
|
||||||
|
else:
|
||||||
|
runner = unittest.TextTestRunner(verbosity=2)
|
||||||
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