Commit c931717
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 <[email protected]>1 parent 72bb721 commit c931717
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 | | |
| |||
816 | 817 | | |
817 | 818 | | |
818 | 819 | | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
819 | 828 | | |
820 | 829 | | |
821 | 830 | | |
822 | 831 | | |
823 | 832 | | |
824 | 833 | | |
825 | 834 | | |
| 835 | + | |
826 | 836 | | |
827 | 837 | | |
828 | 838 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
231 | 234 | | |
232 | 235 | | |
233 | 236 | | |
| |||
242 | 245 | | |
243 | 246 | | |
244 | 247 | | |
245 | | - | |
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
| |||
0 commit comments