• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2
3import argparse
4import os
5import unittest
6
7def main():
8    parser = argparse.ArgumentParser()
9    parser.add_argument('--verbose', '-v', action='store_true')
10    args = parser.parse_args()
11
12    verbosity = 2 if args.verbose else 1
13
14    loader = unittest.TestLoader()
15    tests = loader.discover(os.path.dirname(__file__), 'test_*.py')
16    runner = unittest.runner.TextTestRunner(verbosity=verbosity)
17    runner.run(tests)
18
19if __name__ == '__main__':
20    main()
21