Skip to content

Commit a8ef08d

Browse files
author
Alan Christie
committed
Adds '--allow-no-tests'
1 parent dceac22 commit a8ef08d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

jote/jote.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,9 @@ def main() -> int:
446446
help='Setting this flag will result in jote'
447447
' simply parsing the Job definitions'
448448
' but not running any of the tests.'
449-
' It is can be used to check validate your'
450-
' definition file and its test commands and'
451-
'data.')
449+
' It is can be used to check the syntax of'
450+
' your definition file and its test commands'
451+
' and data.')
452452

453453
arg_parser.add_argument('-k', '--keep-results', action='store_true',
454454
help='Normally all material created to run each'
@@ -478,6 +478,12 @@ def main() -> int:
478478
' Using this negates the effect of any other'
479479
' option.')
480480

481+
arg_parser.add_argument('-a', '--allow-no-tests', action='store_true',
482+
help='Normally jote expects to run tests'
483+
' and if you have no tests jote will fail.'
484+
' To prevent jote complaining about the lack'
485+
' of tests you can use this option.')
486+
481487
args: argparse.Namespace = arg_parser.parse_args()
482488

483489
if args.test and args.job is None:
@@ -564,7 +570,7 @@ def main() -> int:
564570
f' ignored={total_ignore_count}'
565571
f' failed={total_fail_count}'
566572
f' {dry_run}')
567-
elif total_pass_count == 0:
573+
elif total_pass_count == 0 and not args.allow_no_tests:
568574
arg_parser.error('Done (FAILURE)'
569575
f' passed={total_pass_count}'
570576
f' ignored={total_ignore_count}'

0 commit comments

Comments
 (0)