Commit 268eef99 authored by Mathieu Giraud's avatar Mathieu Giraud

src/should.py: --fail-a

see #27
parent 541b6afd
Pipeline #677 passed with stages
in 12 seconds
......@@ -279,6 +279,7 @@ output.add_argument('--xml', action='append_const', dest='output', const=OUT_XML
output.add_argument('-v', '--verbose', action='count', help='increase verbosity', default=1)
output.add_argument('-q', '--quiet', action='store_const', dest='verbose', const=0, help='verbosity to zero')
output.add_argument('--fail-a', action='store_true', help="fail on passing 'a' tests")
output.add_argument("-h", "--help", action="help", help="show this help message and exit")
output.add_argument('--version', action='version',
version='%(prog)s {version}'.format(version=__version__))
......@@ -1141,6 +1142,10 @@ if __name__ == '__main__':
((MOD_ALLOW in test.modifiers) <= (not args.no_a)) and
((MOD_ALLOW in test.modifiers) >= args.only_a)
)
if args.fail_a:
args.mod += ['A']
# Launch tests
fs = FileSet(args.file, timeout = args.timeout, modifiers=''.join(args.mod if args.mod else []))
status = fs.test(variables = variables, cd = args.cd, cd_same = args.cd_same, output = args.output, verbose = args.verbose, only = only)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment