2 #-------------------------------------------------------------------------------
3 # test/run_all_unittests.py
5 # Run all unit tests (alternative to running 'python -m unittest discover ...')
7 # Eli Bendersky (eliben@gmail.com)
8 # This code is in the public domain
9 #-------------------------------------------------------------------------------
10 from __future__ import print_function
13 import unittest2 as unittest
18 if __name__ == '__main__':
20 tests = unittest.TestLoader().discover('test', 'test*.py', 'test')
21 unittest.TextTestRunner().run(tests)
22 except ImportError as err:
24 print('!! Please execute from the root directory of pyelftools')