Skip to content

Commit c88a325

Browse files
committed
Added release notes.
1 parent cdb37a3 commit c88a325

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

doc/api_reference.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ API Reference
2323
[INCLUDE_FILE_PATH]
2424
[STRIP_PARAM_BRACKETS]
2525
[BUNDLE_TESTS]
26+
[EXTRA_ARGS arg1 arg2...]
2627
)
2728

2829
The options are:
@@ -184,10 +185,24 @@ API Reference
184185
Bundled tests generally run faster because :term:`Pytest` can use
185186
caching and :term:`fixtures <fixture>` with a broader scope.
186187

188+
* ``EXTRA_ARGS``
189+
190+
List of extra arguments to pass on the :term:`Pytest` command line for
191+
each test case::
192+
193+
pytest_discover_tests(
194+
...
195+
EXTRA_ARGS "--capture=no" "--cmdopt=demo"
196+
)
197+
198+
.. seealso::
199+
200+
`Pytest Command-Line Flags
201+
<https://docs.pytest.org/en/stable/reference/reference.html#command-line-flags>`_
202+
187203
.. note::
188204

189205
This function works similarly to the `gtest_discover_tests
190206
<https://cmake.org/cmake/help/latest/module/GoogleTest.html#command:gtest_discover_tests>`_
191207
function, which creates :term:`CTest` tests for each :term:`GTest` tests
192208
discovered within a single C++ executable test file.
193-

doc/release/release_notes.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
Release Notes
55
*************
66

7+
.. release:: Upcoming
8+
9+
.. change:: changed
10+
11+
Added ``EXTRA_ARGS`` option to the :func:`pytest_discover_tests`
12+
function, allowing custom arguments to be passed to the :term:`Pytest`
13+
command when executing each test. Thanks :github_user:`AmeyaVS`!
14+
715
.. release:: 0.11.4
816
:date: 2025-01-29
917

0 commit comments

Comments
 (0)