File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
src/client/testing/testController/common Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 26
26
([#17309](https://github.com/Microsoft/vscode-python/issues/17309))
27
27
1. For CI ensure `tensorboard` is installed in python 3 environments only.
28
28
([#17325](https://github.com/Microsoft/vscode-python/issues/17325))
29
+ 1. Fix for test result not found for files starting with py.
30
+ ([#17270](https://github.com/Microsoft/vscode-python/issues/17270))
29
31
30
32
### Thanks
31
33
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export async function updateResultFromJunitXml(
97
97
}
98
98
99
99
const result = junitSuite . testcase . find ( ( t ) => {
100
- const idResult = getRunIdFromRawData ( `${ t . $ . classname } . ${ t . $ . name } ` ) ;
100
+ const idResult = getRunIdFromRawData ( `${ t . $ . classname } :: ${ t . $ . name } ` ) ;
101
101
const idNode = rawTestCaseNode . runId ;
102
102
return idResult === idNode || idNode . endsWith ( idResult ) ;
103
103
} ) ;
Original file line number Diff line number Diff line change @@ -88,9 +88,12 @@ function getRangeFromRawSource(raw: { source: string }): Range | undefined {
88
88
}
89
89
90
90
export function getRunIdFromRawData ( id : string ) : string {
91
+ // TODO: This is a temporary solution to normalize test ids.
92
+ // The current method is error prone and easy to break. When we
93
+ // re-write the test adapters we should make sure we consider this.
91
94
// This is the id that will be used to compare with the results.
92
95
const runId = id
93
- . replace ( / \. p y / g, '' )
96
+ . replace ( / \. p y [ ^ \w \- ] / g, '' ) // we want to get rid of the `.py` in file names
94
97
. replace ( / [ \\ \: \/ ] / g, '.' )
95
98
. replace ( / \: \: / g, '.' )
96
99
. replace ( / \. \. / g, '.' ) ;
You can’t perform that action at this time.
0 commit comments