Commit bfd57b0
feat(testing): expose pytest marks as tags in Test Explorer
Extract pytest marks (e.g., @pytest.mark.slow, @pytest.mark.integration)
during test discovery and expose them as VS Code TestTags with IDs like
"mark.slow", "mark.integration". This enables filtering tests by
marks in the Test Explorer UI using @python-tests:mark.slow syntax.
Changes:
- Add tags field to TestItem TypedDict in pytest plugin
- Extract marks from test_case.own_markers in create_test_node()
- Add tags field to DiscoveredTestItem TypeScript type
- Create TestTag objects from marks in populateTestTree()
Fixes #20350
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 3c0301d commit bfd57b0
File tree
3 files changed
+15
-2
lines changed- python_files/vscode_pytest
- src/client/testing/testController/common
3 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
835 | 836 | | |
836 | 837 | | |
837 | 838 | | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
838 | 847 | | |
839 | 848 | | |
840 | 849 | | |
841 | 850 | | |
842 | 851 | | |
843 | 852 | | |
844 | 853 | | |
| 854 | + | |
845 | 855 | | |
846 | 856 | | |
847 | 857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
257 | 260 | | |
258 | 261 | | |
259 | 262 | | |
| |||
268 | 271 | | |
269 | 272 | | |
270 | 273 | | |
271 | | - | |
272 | 274 | | |
273 | 275 | | |
274 | 276 | | |
| |||
0 commit comments