Skip to content

Commit

Permalink
Cleanup CLI short-options
Browse files Browse the repository at this point in the history
Remove seldom unsed shortr-options for:

* --no-skipped: -k
* --no-multiline: -m
* --no-source: -s

CLEANUP:

* Unused option: --expand
  • Loading branch information
jenisys committed Nov 23, 2022
1 parent 203faf1 commit c19cce8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 23 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ BACKWARD-INCOMPATIBLE:
- DEPRECATING: ``tag-expressions v1`` (old-style)
- BUT: Currently, tag-expression version is automatically detected (and used).

* CLI: Cleanup command-line short-options that are seldom used
(short-options for: --no-skipped (-k), --no-multiline (-m), --no-source (-s)).

GOALS:

- Improve support for Windows (continued)
Expand All @@ -26,6 +29,7 @@ DEVELOPMENT:

CLEANUPS:

* CLI: Remove unused option ``--expand``
* Remove ``stdout_capture``, ``stderr_capture``, ``log_capture``
attributes from ``behave.runner.Context`` class
(use: ``captured`` attribute instead).
Expand Down
13 changes: 4 additions & 9 deletions behave/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def to_string(level):
help="""Specify name annotation schema for scenario outline
(default="{name} -- @{row.id} {examples.name}").""")),

(("-k", "--no-skipped"),
(("--no-skipped",),
dict(action="store_false", dest="show_skipped",
help="Don't print skipped steps (due to tags).")),

Expand All @@ -160,10 +160,9 @@ def to_string(level):
This is the default behaviour. This switch is used to
override a configuration file setting.""")),

(("-m", "--no-multiline"),
(("--no-multiline",),
dict(action="store_false", dest="show_multiline",
help="""Don't print multiline strings and tables under
steps.""")),
help="""Don't print multiline strings and tables under steps.""")),

(("--multiline", ),
dict(action="store_true", dest="show_multiline",
Expand Down Expand Up @@ -280,7 +279,7 @@ def to_string(level):
default=DEFAULT_RUNNER_CLASS_NAME,
help='Use own runner class, like: "behave.runner:Runner"')),

(("-s", "--no-source"),
(("--no-source",),
dict(action="store_false", dest="show_source",
help="""Don't print the file and line of the step definition with the
steps.""")),
Expand Down Expand Up @@ -342,10 +341,6 @@ def to_string(level):
"plain" formatter, do not capture stdout or logging output
and stop at the first failure.""")),

(("-x", "--expand"),
dict(action="store_true",
help="Expand scenario outline tables in output.")),

(("--lang",),
dict(metavar="LANG",
help="Use keywords for a language other than English.")),
Expand Down
17 changes: 3 additions & 14 deletions docs/behave.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ You may see the same information presented below at any time using ``behave
Show a catalog of all available step definitions. SAME AS:
--format=steps.catalog --dry-run --no-summary -q

.. option:: -k, --no-skipped
.. option:: --no-skipped

Don't print skipped steps (due to tags).

Expand All @@ -83,7 +83,7 @@ You may see the same information presented below at any time using ``behave
Print snippets for unimplemented steps. This is the default behaviour.
This switch is used to override a configuration file setting.

.. option:: -m, --no-multiline
.. option:: --no-multiline

Don't print multiline strings and tables under steps.

Expand Down Expand Up @@ -180,7 +180,7 @@ You may see the same information presented below at any time using ``behave

Use own runner class, like: "behave.runner:Runner"

.. option:: -s, --no-source
.. option:: --no-source

Don't print the file and line of the step definition with the steps.

Expand Down Expand Up @@ -225,10 +225,6 @@ You may see the same information presented below at any time using ``behave
formatter, do not capture stdout or logging output and stop at the
first failure.

.. option:: -x, --expand

Expand scenario outline tables in output.

.. option:: --lang

Use keywords for a language other than English.
Expand Down Expand Up @@ -633,13 +629,6 @@ Configuration Parameters
formatter, do not capture stdout or logging output and stop at the
first failure.

.. index::
single: configuration param; expand

.. describe:: expand : bool

Expand scenario outline tables in output.

.. index::
single: configuration param; lang

Expand Down

0 comments on commit c19cce8

Please sign in to comment.