From 1bb0081b99664175954f69beeea94e04952754ab Mon Sep 17 00:00:00 2001 From: Bryce Gattis Date: Thu, 25 Apr 2024 15:56:14 -0500 Subject: [PATCH 1/5] Add a bit of additional information about running tests in a module for new users Signed-off-by: Bryce Gattis --- doc/en/how-to/usage.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/en/how-to/usage.rst b/doc/en/how-to/usage.rst index fe46fad2d..b34a4b896 100644 --- a/doc/en/how-to/usage.rst +++ b/doc/en/how-to/usage.rst @@ -26,6 +26,11 @@ Pytest supports several ways to run and select tests from the command-line or fr pytest test_mod.py +When passing a path as a positional argument like this, it's not possible to +pass a file basename. If you want to pass a path to a file, you must pass +either a relative path or an absolute path. Otherwise, consider the below +keyword expressions instead. + **Run tests in a directory** .. code-block:: bash From 0700af95d8d54d0f4af23a680be4fb9ea123b3a6 Mon Sep 17 00:00:00 2001 From: Bryce Gattis Date: Thu, 25 Apr 2024 16:02:46 -0500 Subject: [PATCH 2/5] Update AUTHORS Signed-off-by: Bryce Gattis --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index d7148acfc..d612977dc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -69,6 +69,7 @@ Brian Maissy Brian Okken Brianna Laugher Bruno Oliveira +Bryce Gattis Cal Jacobson Cal Leeming Carl Friedrich Bolz From 1c4e0c6b92d898faca35a2b2e399484659fc8008 Mon Sep 17 00:00:00 2001 From: Bryce Gattis Date: Thu, 25 Apr 2024 16:05:11 -0500 Subject: [PATCH 3/5] Add changelog file Signed-off-by: Bryce Gattis --- changelog/12245.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/12245.doc.rst diff --git a/changelog/12245.doc.rst b/changelog/12245.doc.rst new file mode 100644 index 000000000..5ac753503 --- /dev/null +++ b/changelog/12245.doc.rst @@ -0,0 +1 @@ +Added paragraph in ``Specifying which tests to run`` documentation to clarify pytest capabilities when trying to run tests for a single module. From 02abaeca6cdd14145d64dabb2ac72dd684ad48a5 Mon Sep 17 00:00:00 2001 From: Bryce Gattis Date: Fri, 26 Apr 2024 09:26:44 -0500 Subject: [PATCH 4/5] Fix language Signed-off-by: Bryce Gattis --- doc/en/how-to/usage.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/en/how-to/usage.rst b/doc/en/how-to/usage.rst index b34a4b896..7b588ce2c 100644 --- a/doc/en/how-to/usage.rst +++ b/doc/en/how-to/usage.rst @@ -26,10 +26,10 @@ Pytest supports several ways to run and select tests from the command-line or fr pytest test_mod.py -When passing a path as a positional argument like this, it's not possible to -pass a file basename. If you want to pass a path to a file, you must pass -either a relative path or an absolute path. Otherwise, consider the below -keyword expressions instead. +When passing a path as a positional argument, pytest does not recursively +searches when given a file basename. If you want to pass a path to a file, you +must pass either a relative path or an absolute path. Otherwise, consider the +below keyword expressions instead. **Run tests in a directory** From 33d0613483994cbc2f00c1d6d325a9ee1009a292 Mon Sep 17 00:00:00 2001 From: Bryce Gattis Date: Fri, 26 Apr 2024 09:27:23 -0500 Subject: [PATCH 5/5] Fix typo Signed-off-by: Bryce Gattis --- doc/en/how-to/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/how-to/usage.rst b/doc/en/how-to/usage.rst index 7b588ce2c..b6afb1cda 100644 --- a/doc/en/how-to/usage.rst +++ b/doc/en/how-to/usage.rst @@ -27,7 +27,7 @@ Pytest supports several ways to run and select tests from the command-line or fr pytest test_mod.py When passing a path as a positional argument, pytest does not recursively -searches when given a file basename. If you want to pass a path to a file, you +search when given a file basename. If you want to pass a path to a file, you must pass either a relative path or an absolute path. Otherwise, consider the below keyword expressions instead.