assay
assay copied to clipboard
Add batch mode --verbose, --nocolor options and allow selecting/deselecting tests by regex patterns
Hi,
This PR introduces 3 new features split in two and a half commits:
- Add the command argument
-c, --nocolor
to disable the tty color coding. Useful for CI logs, where the coloring control sequences look ugly, e.g. the openSUSE Build Service. - Add the command argument
-v, --verbose
(available in batch mode only) to show which tests are running and passing instead of just a '.' - Add the command family
--pattern REGEX, -k REGEX
and--deselect REGEX, + REGEX
to filter tests by regular expressions.
$ python3 -m assay -h
usage: assay [-h] [-b] [--pattern REGEX] [--deselect REGEX] [-v] [-c] name [name ...]
Fast testing framework
positional arguments:
name directory, package, or module to test
optional arguments:
-h, --help show this help message and exit
-b, --batch run tests once, then exit with success or failure
--pattern REGEX, -k REGEX
only run test functions matching the regular expression REGEX
--deselect REGEX, +k REGEX
do not run test functions matching the regular expression REGEX
-v, --verbose be verbose in batch mode: print test names being tested
-c, --nocolor suppress colored printout