Upstream version 8.36.161.0
[platform/framework/web/crosswalk.git] / src / third_party / pyelftools / test / run_all_unittests.py
1 #!/usr/bin/env python
2 #-------------------------------------------------------------------------------
3 # test/run_all_unittests.py
4 #
5 # Run all unit tests (alternative to running 'python -m unittest discover ...')
6 #
7 # Eli Bendersky (eliben@gmail.com)
8 # This code is in the public domain
9 #-------------------------------------------------------------------------------
10 from __future__ import print_function
11
12 try:
13     import unittest2 as unittest
14 except ImportError:
15     import unittest
16
17
18 if __name__ == '__main__':
19     try:
20         tests = unittest.TestLoader().discover('test', 'test*.py', 'test')
21         unittest.TextTestRunner().run(tests)
22     except ImportError as err:
23         print(err)
24         print('!! Please execute from the root directory of pyelftools')
25
26