blob: 2a82bb612ab6425fa6f75885a8549dfa04d264df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
import unittest
import sys, os, glob
os.chdir(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, '../')
sys.path.insert(0, './')
unittests = [name[2:-3] for name in glob.glob('./test_*.py')]
suite = unittest.defaultTestLoader.loadTestsFromNames(unittests)
#import doctest
#doctests = glob.glob('./doctest_*.txt')
#suite.addTest(doctest.DocFileSuite(*doctests))
def run():
import bottle
bottle.debug(True)
result = unittest.TextTestRunner(verbosity=0).run(suite)
sys.exit((result.errors or result.failures) and 1 or 0)
if __name__ == '__main__':
run()
|