Skip to content

More fixes for test UI #16967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/2 Fixes/16962.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ensure 2.7 unittest still work with new test support.
1 change: 1 addition & 0 deletions news/2 Fixes/16963.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix issue with parsing test run ids for reporting test status.
4 changes: 2 additions & 2 deletions src/client/testing/testController/common/testItemUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ function getRangeFromRawSource(raw: { source: string }): Range | undefined {
function getRunIdFromRawData(raw: { id: string }): string {
// This is the id that will be used to compare with the results.
const runId = raw.id
.replace(/\.py/g, '')
.replace(/[\\\:\/]/g, '.')
.replace(/\:\:/g, '.')
.replace(/\.\./g, '.')
.replace(/\.py/g, '');
.replace(/\.\./g, '.');
return runId.startsWith('.') ? runId.substr(1) : runId;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def generate_test_cases(suite):
if isinstance(test, unittest.TestCase):
yield test
else:
yield from generate_test_cases(test)
for test_case in generate_test_cases(test):
yield test_case

loader = unittest.TestLoader()
suite = loader.discover("${startDir}", pattern="${pattern}")
Expand Down