5
gae_path = '/usr/local/google_appengine'
7
current_path = os.path.abspath(os.path.dirname(__file__))
8
tests_path = os.path.join(current_path, 'tests')
13
# All libs used by webapp2 and extras.
14
os.path.join(current_path, 'lib', 'appengine-ndb-experiment'),
15
os.path.join(current_path, 'lib', 'babel'),
16
os.path.join(current_path, 'lib', 'Jinja2-2.6'),
17
os.path.join(current_path, 'lib', 'Mako-0.4.1'),
18
os.path.join(current_path, 'lib', 'gaepytz-2011h'),
19
os.path.join(current_path, 'lib', 'WebOb-1.0.8'),
21
os.path.join(gae_path, 'lib', 'django_0_96'),
22
#os.path.join(gae_path, 'lib', 'webob'),
23
os.path.join(gae_path, 'lib', 'yaml', 'lib'),
24
os.path.join(gae_path, 'lib', 'protorpc'),
25
os.path.join(gae_path, 'lib', 'simplejson'),
28
all_tests = [f[:-8] for f in os.listdir(tests_path) if f.endswith('_test.py')]
32
suite = unittest.TestSuite()
33
loader = unittest.TestLoader()
35
suite.addTest(loader.loadTestsFromName(test))
38
if __name__ == '__main__':
43
$ python run_tests.py app
44
To run a couple of tests:
45
$ python run_tests.py app config sessions
47
$ coverage run run_tests.py
53
tests = ['%s_test' % t for t in tests]
54
suite = get_suite(tests)
55
unittest.TextTestRunner(verbosity=2).run(suite)