Skip to content

Commit b1f3387

Browse files
[7.4.x] #11091: documentation should use hypthonated properties (#11750)
1 parent 2cdd619 commit b1f3387

File tree

10 files changed

+10
-8
lines changed

10 files changed

+10
-8
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ Ronny Pfannschmidt
324324
Ross Lawley
325325
Ruaridh Williamson
326326
Russel Winder
327+
Ryan Puddephatt
327328
Ryan Wooden
328329
Saiprasad Kale
329330
Samuel Colvin

changelog/11091.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated documentation to refer to hyphenated options: replaced ``--junitxml`` with ``--junit-xml`` and ``--collectonly`` with ``--collect-only``.

changelog/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Each file should be named like ``<ISSUE>.<TYPE>.rst``, where
1414
``<ISSUE>`` is an issue number, and ``<TYPE>`` is one of:
1515

1616
* ``feature``: new user facing features, like new command-line options and new behavior.
17-
* ``improvement``: improvement of existing functionality, usually without requiring user intervention (for example, new fields being written in ``--junitxml``, improved colors in terminal, etc).
17+
* ``improvement``: improvement of existing functionality, usually without requiring user intervention (for example, new fields being written in ``--junit-xml``, improved colors in terminal, etc).
1818
* ``bugfix``: fixes a bug.
1919
* ``doc``: documentation improvement, like rewording an entire session or adding missing docs.
2020
* ``deprecation``: feature deprecation.

doc/en/deprecations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ By using ``legacy`` you will keep using the legacy/xunit1 format when upgrading
596596
pytest 6.0, where the default format will be ``xunit2``.
597597

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

602602
Services known to support the ``xunit2`` format:

doc/en/example/markers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Or select multiple nodes:
136136

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

141141
Using ``-k expr`` to select tests based on their name
142142
-------------------------------------------------------

doc/en/example/simple.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,4 +1088,4 @@ application with standard ``pytest`` command-line options:
10881088

10891089
.. code-block:: bash
10901090
1091-
./app_main --pytest --verbose --tb=long --junitxml=results.xml test-suite/
1091+
./app_main --pytest --verbose --tb=long --junit=xml=results.xml test-suite/

doc/en/how-to/output.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ integration servers, use this invocation:
478478

479479
.. code-block:: bash
480480
481-
pytest --junitxml=path
481+
pytest --junit-xml=path
482482
483483
to create an XML file at ``path``.
484484

src/_pytest/junitxml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def test_foo(record_testsuite_property):
369369
__tracebackhide__ = True
370370

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

src/_pytest/pytester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ def inline_runsource(self, source: str, *cmdlineargs) -> HookRecorder:
10741074
return self.inline_run(*values)
10751075

10761076
def inline_genitems(self, *args) -> Tuple[List[Item], HookRecorder]:
1077-
"""Run ``pytest.main(['--collectonly'])`` in-process.
1077+
"""Run ``pytest.main(['--collect-only'])`` in-process.
10781078
10791079
Runs the :py:func:`pytest.main` function to run all of pytest inside
10801080
the test process itself like :py:meth:`inline_run`, but returns a

testing/python/metafunc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ def test_foo(x):
14931493
pass
14941494
"""
14951495
)
1496-
result = pytester.runpytest("--collectonly")
1496+
result = pytester.runpytest("--collect-only")
14971497
result.stdout.fnmatch_lines(
14981498
[
14991499
"collected 0 items / 1 error",

0 commit comments

Comments
 (0)