diff --git a/byexample/cmdline.py b/byexample/cmdline.py index 4ec2d144..ad603dff 100644 --- a/byexample/cmdline.py +++ b/byexample/cmdline.py @@ -341,6 +341,11 @@ def parse_args(args=None): default='all', help="control how to pretty print the output." ) + g.add_argument( + "--no-progress-bar", + action='store_true', + help="do not show the progress bar." + ) g.add_argument( '-V', '--version', diff --git a/byexample/init.py b/byexample/init.py index 1a92a16d..91b188ec 100644 --- a/byexample/init.py +++ b/byexample/init.py @@ -563,7 +563,8 @@ def init_byexample(args, sharer): verify_encodings(args.encoding, args.verbosity) cfg = { - 'use_progress_bar': args.pretty == 'all', + 'use_progress_bar': args.pretty == 'all' and \ + not args.no_progress_bar, 'use_colors': args.pretty == 'all', 'quiet': args.quiet, 'verbosity': args.verbosity, diff --git a/docs/overview/usage.md b/docs/overview/usage.md index de3471cd..c8b9ab9e 100644 --- a/docs/overview/usage.md +++ b/docs/overview/usage.md @@ -95,7 +95,8 @@ usage: byexample -l [--ff] [--timeout ] [-j ] [--dry] [-d {none,unified,ndiff,context,tool}] [--difftool ] [--no-enhance-diff] [-o ] [--show-options] [-m ] [--encoding ] [--show-failures ] - [--pretty {none,all}] [-V] [-v | -q] [-h | -xh] + [--pretty {none,all}] [--no-progress-bar] [-V] [-v | -q] + [-h | -xh]   Write snippets of code in C++, Python, Ruby, and others as documentation and execute them as regression tests. @@ -151,6 +152,7 @@ Miscellaneous Options: suppress the rest (the execution of the examples is not stopped, only the failures are not shown) --pretty {none,all} control how to pretty print the output. + --no-progress-bar do not show the progress bar. -V, --version show byexample's version and license, then exit   Logging: