blob: 6467a2160be7598a6d40014de8e63e62fc7878a9 [file] [log] [blame]
epogerb1442712014-06-05 10:30:37 -07001#!/usr/bin/python
2
3"""
4Copyright 2014 Google Inc.
5
6Use of this source code is governed by a BSD-style license that can be
7found in the LICENSE file.
8
9Run all unittests within this directory tree, recursing into subdirectories.
10"""
11
12import os
13import unittest
14
15from tests import skimage_self_test
16
17
18def main():
19 # First, run any tests that cannot be automatically discovered (because
20 # they don't use Python's unittest framework).
21 skimage_self_test.main()
22
23 # Now discover/run all tests that use Python's unittest framework.
24 suite = unittest.TestLoader().discover(os.path.dirname(__file__),
25 pattern='*_test.py')
26 results = unittest.TextTestRunner(verbosity=2).run(suite)
27 print repr(results)
28 if not results.wasSuccessful():
29 raise Exception('failed one or more unittests')
30
31if __name__ == '__main__':
32 main()