mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49: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))
|
||||
|
||||
suite = unittest.TestSuite(test.suites)
|
||||
runner = unittest.TextTestRunner(verbosity=2,
|
||||
failfast=options.fail_fast)
|
||||
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,
|
||||
failfast=True)
|
||||
else:
|
||||
runner = unittest.TextTestRunner(verbosity=2)
|
||||
print('Testing began at %s (pid %s)' % (time.ctime(), os.getpid()))
|
||||
if options.clean:
|
||||
shutil.rmtree(conf.supybot.directories.log())
|
||||
|
Loading…
Reference in New Issue
Block a user