Skip to content

Commit 5525b9d

Browse files
authored
edit docs to add autoTestDiscoverOnSavePattern
1 parent 96c02f5 commit 5525b9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/python/testing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_decrement():
147147

148148
By default, the Python extension attempts to discover tests once you enable a framework. You can also trigger test discovery at any time using the **Test: Refresh Tests** command from the Command Palette.
149149

150-
`python.testing.autoTestDiscoverOnSaveEnabled` is set to `true` by default, meaning that test discovery is also performed automatically whenever you add, delete, or update any Python file in the workspace. To disable this feature, set the value to `false`, which can be done either in the Settings editor or in the `settings.json` file as described in the VS Code [Settings](/docs/editor/settings.md) documentation. You will need to reload the window for this setting to take effect.
150+
`python.testing.autoTestDiscoverOnSaveEnabled` is set to `true` by default, meaning that test discovery is also performed automatically whenever you add, delete, or update any Python file in the workspace. To disable this feature, set the value to `false`, which can be done either in the Settings editor or in the `settings.json` file as described in the VS Code [Settings](/docs/editor/settings.md) documentation. You will need to reload the window for this setting to take effect. If `python.testing.autoTestDiscoverOnSaveEnabled` is set to true, you can refine when auto test discovery occurs by using the `python.testing.autoTestDiscoverOnSavePattern` setting, which specifies a glob pattern that determines which file changes trigger test discovery. Its default value is `**/*.py`.
151151

152152
Test discovery applies the discovery patterns for the current framework (which can be customized using the [Test configuration settings](#test-configuration-settings)). The default behavior is as follows:
153153

@@ -384,6 +384,7 @@ The settings that affect the UI of the testing features are provided by VS Code
384384
| Setting<br/>(python.testing.) | Default | Description |
385385
| --- | --- | --- |
386386
| autoTestDiscoverOnSaveEnabled | `true` | Specifies whether to enable or disable auto run test discovery when saving a test file. You may need to reload the window after making changes to this setting for it to be applied. |
387+
| autoTestDiscoverOnSavePattern | `**/*.py` | Specifies a glob pattern so that determines which file changes trigger auto test discovery when `autoTestDiscoverOnSaveEnabled` is true. |
387388
| cwd | null | Specifies an optional working directory for tests. |
388389
| debugPort | `3000` | Port number used for debugging of unittest tests. |
389390
| promptToConfigure | `true` | Specifies whether VS Code prompts to configure a test framework if potential tests are discovered. |

0 commit comments

Comments
 (0)