aboutsummaryrefslogtreecommitdiff
path: root/unit_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'unit_tests.py')
-rw-r--r--unit_tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/unit_tests.py b/unit_tests.py
index 923d108..4d09b6a 100644
--- a/unit_tests.py
+++ b/unit_tests.py
@@ -14,7 +14,8 @@ def main():
from sys import argv
global args
args = parse_arguments(argv[1:])
- unittest.main(verbosity = 1 if args.quiet else 2, argv = argv[:1], catchbreak = True)
+ argv = argv[:1] + args.only_test
+ unittest.main(verbosity = 1 if args.quiet else 2, argv = argv, catchbreak = True)
def parse_arguments(argv = ()):
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
@@ -33,6 +34,7 @@ def parse_arguments(argv = ()):
parser.add_argument("--sql-file", default = "unit_tests.db", help = "SQLite3 database")
parser.add_argument("--ks-client", default = "unit_tests.ks-client", help = "client keystore (ks_mmap only)")
parser.add_argument("--ks-server", default = "unit_tests.ks-server", help = "server keystore (ks_mmap only)")
+ parser.add_argument("--only-test", default = [], nargs = "+", help = "only run tests named here")
return parser.parse_args(argv)
args = parse_arguments()