|
1 | 1 | #!/usr/bin/env python |
| 2 | +""" |
| 3 | +A auto unit tests runner for CTools. |
| 4 | +
|
| 5 | +Use standard unittest library, so we can run in any python environment (no need install pytest). |
| 6 | +
|
| 7 | +""" |
2 | 8 | import sys |
3 | 9 | import os |
4 | 10 | import shutil |
@@ -37,25 +43,27 @@ def _show_info(): |
37 | 43 | sys.stderr.flush() |
38 | 44 |
|
39 | 45 |
|
40 | | -parser = argparse.ArgumentParser() |
| 46 | +parser = argparse.ArgumentParser( |
| 47 | + prog=os.path.basename(sys.argv[0]), description=__doc__.lstrip().splitlines()[0] |
| 48 | +) |
41 | 49 | parser.add_argument( |
42 | | - "-k", dest="pattern", help="Only run tests which match the given substring" |
| 50 | + "-k", dest="pattern", help="only run tests which match the given substring" |
43 | 51 | ) |
44 | | -parser.add_argument("-v", "--verbose", dest="verbose", help="Verbose output") |
45 | | -parser.add_argument("-q", "--quiet", dest="quiet", help="Quiet output") |
| 52 | +parser.add_argument("-v", "--verbose", dest="verbose", help="verbose output") |
| 53 | +parser.add_argument("-q", "--quiet", dest="quiet", help="quiet output") |
46 | 54 | parser.add_argument( |
47 | 55 | "-s", |
48 | 56 | "--start-directory", |
49 | 57 | default=".", |
50 | 58 | dest="start_directory", |
51 | | - help="Directory to start discovery ('.' default)", |
| 59 | + help="directory to start discovery ('.' default)", |
52 | 60 | ) |
53 | 61 | parser.add_argument( |
54 | 62 | "-p", |
55 | 63 | "--python-path", |
56 | 64 | dest="python_path", |
57 | 65 | action="append", |
58 | | - help="Include python path", |
| 66 | + help="python path inserted into sys.path", |
59 | 67 | ) |
60 | 68 |
|
61 | 69 |
|
|
0 commit comments