Skip to content

Commit

Permalink
[7.4.x] #11091: documentation should use hypthonated properties (#11750)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Dec 31, 2023
1 parent 2cdd619 commit b1f3387
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ Ronny Pfannschmidt
Ross Lawley
Ruaridh Williamson
Russel Winder
Ryan Puddephatt
Ryan Wooden
Saiprasad Kale
Samuel Colvin
Expand Down
1 change: 1 addition & 0 deletions changelog/11091.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated documentation to refer to hyphenated options: replaced ``--junitxml`` with ``--junit-xml`` and ``--collectonly`` with ``--collect-only``.
2 changes: 1 addition & 1 deletion changelog/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Each file should be named like ``<ISSUE>.<TYPE>.rst``, where
``<ISSUE>`` is an issue number, and ``<TYPE>`` is one of:

* ``feature``: new user facing features, like new command-line options and new behavior.
* ``improvement``: improvement of existing functionality, usually without requiring user intervention (for example, new fields being written in ``--junitxml``, improved colors in terminal, etc).
* ``improvement``: improvement of existing functionality, usually without requiring user intervention (for example, new fields being written in ``--junit-xml``, improved colors in terminal, etc).
* ``bugfix``: fixes a bug.
* ``doc``: documentation improvement, like rewording an entire session or adding missing docs.
* ``deprecation``: feature deprecation.
Expand Down
2 changes: 1 addition & 1 deletion doc/en/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ By using ``legacy`` you will keep using the legacy/xunit1 format when upgrading
pytest 6.0, where the default format will be ``xunit2``.

In order to let users know about the transition, pytest will issue a warning in case
the ``--junitxml`` option is given in the command line but ``junit_family`` is not explicitly
the ``--junit-xml`` option is given in the command line but ``junit_family`` is not explicitly
configured in ``pytest.ini``.

Services known to support the ``xunit2`` format:
Expand Down
2 changes: 1 addition & 1 deletion doc/en/example/markers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Or select multiple nodes:

Node IDs for failing tests are displayed in the test summary info
when running pytest with the ``-rf`` option. You can also
construct Node IDs from the output of ``pytest --collectonly``.
construct Node IDs from the output of ``pytest --collect-only``.

Using ``-k expr`` to select tests based on their name
-------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/en/example/simple.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1088,4 +1088,4 @@ application with standard ``pytest`` command-line options:

.. code-block:: bash
./app_main --pytest --verbose --tb=long --junitxml=results.xml test-suite/
./app_main --pytest --verbose --tb=long --junit=xml=results.xml test-suite/
2 changes: 1 addition & 1 deletion doc/en/how-to/output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ integration servers, use this invocation:

.. code-block:: bash
pytest --junitxml=path
pytest --junit-xml=path
to create an XML file at ``path``.

Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/junitxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def test_foo(record_testsuite_property):
__tracebackhide__ = True

def record_func(name: str, value: object) -> None:
"""No-op function in case --junitxml was not passed in the command-line."""
"""No-op function in case --junit-xml was not passed in the command-line."""
__tracebackhide__ = True
_check_record_param_type("name", name)

Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/pytester.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ def inline_runsource(self, source: str, *cmdlineargs) -> HookRecorder:
return self.inline_run(*values)

def inline_genitems(self, *args) -> Tuple[List[Item], HookRecorder]:
"""Run ``pytest.main(['--collectonly'])`` in-process.
"""Run ``pytest.main(['--collect-only'])`` in-process.
Runs the :py:func:`pytest.main` function to run all of pytest inside
the test process itself like :py:meth:`inline_run`, but returns a
Expand Down
2 changes: 1 addition & 1 deletion testing/python/metafunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ def test_foo(x):
pass
"""
)
result = pytester.runpytest("--collectonly")
result = pytester.runpytest("--collect-only")
result.stdout.fnmatch_lines(
[
"collected 0 items / 1 error",
Expand Down

0 comments on commit b1f3387

Please sign in to comment.