GeezerVison is showing github.com — added ability to debug unittests · edorado93/vscode-python@89a6801
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: package.json +17Lines changed: 17 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 38 | 38 | "onCommand:python.execInTerminal", | 39 | 39 | "onCommand:python.sortImports", | 40 | 40 | "onCommand:python.runtests", | | 41 | + "onCommand:python.debugtests", | 41 | 42 | "onCommand:python.setInterpreter", | 42 | 43 | "onCommand:python.viewTestUI", | 43 | 44 | "onCommand:python.viewTestOutput", | 44 | 45 | "onCommand:python.selectAndRunTestMethod", | | 46 | + "onCommand:python.selectAndDebugTestMethod", | 45 | 47 | "onCommand:python.runFailedTests", | 46 | 48 | "onCommand:python.execSelectionInTerminal", | 47 | 49 | "onCommand:jupyter.runSelectionLine", | | 98 | 100 | "title": "Run All Unit Tests", | 99 | 101 | "category": "Python" | 100 | 102 | }, | | 103 | + { | | 104 | + "command": "python.debugtests", | | 105 | + "title": "Debug All Unit Tests", | | 106 | + "category": "Python" | | 107 | + }, | 101 | 108 | { | 102 | 109 | "command": "python.execInTerminal", | 103 | 110 | "title": "Run Python File in Terminal", | | 128 | 135 | "title": "Run Unit Test Method ...", | 129 | 136 | "category": "Python" | 130 | 137 | }, | | 138 | + { | | 139 | + "command": "python.selectAndDebugTestMethod", | | 140 | + "title": "Debug Unit Test Method ...", | | 141 | + "category": "Python" | | 142 | + }, | 131 | 143 | { | 132 | 144 | "command": "python.runFailedTests", | 133 | 145 | "title": "Run Failed Unit Tests", | | 206 | 218 | "command": "python.runtests", | 207 | 219 | "group": "Python" | 208 | 220 | }, | | 221 | + { | | 222 | + "when": "resourceLangId == python", | | 223 | + "command": "python.debugtests", | | 224 | + "group": "Python" | | 225 | + }, | 209 | 226 | { | 210 | 227 | "when": "resourceLangId == python", | 211 | 228 | "command": "python.execInTerminal", | |
Collapse file Copy file name to clipboardExpand all lines: pythonFiles/PythonTools/visualstudio_py_testlauncher.py +4-1Lines changed: 4 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -235,6 +235,9 @@ def main(): | 235 | 235 | DEBUG_ENTRYPOINTS.add(get_code(main)) | 236 | 236 |
| 237 | 237 | enable_attach(opts.secret, ('127.0.0.1', getattr(opts, 'port', DEFAULT_PORT)), redirect_output = True) | | 238 | + sys.stdout.flush() | | 239 | + print('READY') | | 240 | + sys.stdout.flush() | 238 | 241 | wait_for_attach() | 239 | 242 | elif opts.mixed_mode: | 240 | 243 | # For mixed-mode attach, there's no ptvsd and hence no wait_for_attach(), | @@ -312,7 +315,7 @@ def main(): | 312 | 315 | if opts.uf is not None: | 313 | 316 | runner = unittest.TextTestRunner(verbosity=opts.uvInt, resultclass=VsTestResult, failfast=True) | 314 | 317 | else: | 315 | | - runner = unittest.TextTestRunner(verbosity=opts.uvInt, resultclass=VsTestResult) | | 318 | + runner = unittest.TextTestRunner(verbosity=opts.uvInt, resultclass=VsTestResult) | 316 | 319 | result = runner.run(tests) | 317 | 320 | sys.exit(not result.wasSuccessful()) | 318 | 321 | finally: | |
Collapse file Copy file name to clipboardExpand all lines: src/client/common/constants.ts +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,15 +7,18 @@ export namespace Commands { | 7 | 7 | export const Exec_Selection_In_Terminal = 'python.execSelectionInTerminal'; | 8 | 8 | export const Tests_View_UI = 'python.viewTestUI'; | 9 | 9 | export const Tests_Picker_UI = 'python.selectTestToRun'; | | 10 | + export const Tests_Picker_UI_Debug = 'python.selectTestToDebug'; | 10 | 11 | export const Tests_Discover = 'python.discoverTests'; | 11 | 12 | export const Tests_Run_Failed = 'python.runFailedTests'; | 12 | 13 | export const Sort_Imports = 'python.sortImports'; | 13 | 14 | export const Tests_Run = 'python.runtests'; | | 15 | + export const Tests_Debug = 'python.debugtests'; | 14 | 16 | export const Tests_Ask_To_Stop_Test = 'python.askToStopUnitTests'; | 15 | 17 | export const Tests_Ask_To_Stop_Discovery = 'python.askToStopUnitTestDiscovery'; | 16 | 18 | export const Tests_Stop = 'python.stopUnitTests'; | 17 | 19 | export const Tests_ViewOutput = 'python.viewTestOutput'; | 18 | 20 | export const Tests_Select_And_Run_Method = 'python.selectAndRunTestMethod'; | | 21 | + export const Tests_Select_And_Debug_Method = 'python.selectAndDebugTestMethod'; | 19 | 22 | export const Refactor_Extract_Variable = 'python.refactorExtractVariable'; | 20 | 23 | export const Refaactor_Extract_Method = 'python.refactorExtractMethod'; | 21 | 24 |
| @@ -53,7 +56,8 @@ export namespace Octicons { | 53 | 56 | export const Button_Text_Tests_View_Output = 'View Output'; | 54 | 57 |
| 55 | 58 | export namespace Text { | 56 | | - export const CodeLensUnitTest = 'Test'; | | 59 | + export const CodeLensRunUnitTest = 'Run Test'; | | 60 | + export const CodeLensDebugUnitTest = 'Debug Test'; | 57 | 61 | } | 58 | 62 | export namespace Delays { | 59 | 63 | // Max time to wait before aborting the generation of code lenses for unit tests | |
Collapse file Copy file name to clipboardExpand all lines: src/client/unittests/codeLenses/testFiles.ts +54-26Lines changed: 54 additions & 26 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | 'use strict'; | 2 | 2 |
| 3 | 3 | import * as vscode from 'vscode'; | 4 | | -import {CodeLensProvider, TextDocument, CancellationToken, CodeLens, SymbolInformation} from 'vscode'; | 5 | | -import {TestFile, TestsToRun, TestSuite, TestFunction} from '../common/contracts'; | | 4 | +import { CodeLensProvider, TextDocument, CancellationToken, CodeLens, SymbolInformation } from 'vscode'; | | 5 | +import { TestFile, TestsToRun, TestSuite, TestFunction } from '../common/contracts'; | 6 | 6 | import * as constants from '../../common/constants'; | 7 | | -import {getDiscoveredTests} from '../common/testUtils'; | | 7 | +import { getDiscoveredTests } from '../common/testUtils'; | 8 | 8 |
| 9 | 9 | interface CodeLensData { | 10 | 10 | symbolKind: vscode.SymbolKind; | @@ -69,7 +69,7 @@ function getCodeLenses(documentUri: vscode.Uri, token: vscode.CancellationToken) | 69 | 69 |
| 70 | 70 | return getCodeLens(documentUri.fsPath, allFuncsAndSuites, | 71 | 71 | range, symbol.name, symbol.kind); | 72 | | - }).filter(codeLens => codeLens !== null); | | 72 | + }).reduce((previous, current) => previous.concat(current), []).filter(codeLens => codeLens !== null); | 73 | 73 | }, reason => { | 74 | 74 | if (token.isCancellationRequested) { | 75 | 75 | return []; | @@ -82,7 +82,7 @@ function getCodeLenses(documentUri: vscode.Uri, token: vscode.CancellationToken) | 82 | 82 | const testParametirizedFunction = /.*\[.*\]/g; | 83 | 83 |
| 84 | 84 | function getCodeLens(fileName: string, allFuncsAndSuites: FunctionsAndSuites, | 85 | | - range: vscode.Range, symbolName: string, symbolKind: vscode.SymbolKind): vscode.CodeLens { | | 85 | + range: vscode.Range, symbolName: string, symbolKind: vscode.SymbolKind): vscode.CodeLens[] { | 86 | 86 |
| 87 | 87 | switch (symbolKind) { | 88 | 88 | case vscode.SymbolKind.Function: | @@ -94,27 +94,41 @@ function getCodeLens(fileName: string, allFuncsAndSuites: FunctionsAndSuites, | 94 | 94 | if (!cls) { | 95 | 95 | return null; | 96 | 96 | } | 97 | | - return new CodeLens(range, { | 98 | | - title: constants.Text.CodeLensUnitTest, | 99 | | - command: constants.Commands.Tests_Run, | 100 | | - arguments: [<TestsToRun>{ testSuite: [cls] }] | 101 | | - }); | | 97 | + return [ | | 98 | + new CodeLens(range, { | | 99 | + title: constants.Text.CodeLensRunUnitTest, | | 100 | + command: constants.Commands.Tests_Run, | | 101 | + arguments: [<TestsToRun>{ testSuite: [cls] }] | | 102 | + }), | | 103 | + new CodeLens(range, { | | 104 | + title: constants.Text.CodeLensDebugUnitTest, | | 105 | + command: constants.Commands.Tests_Debug, | | 106 | + arguments: [<TestsToRun>{ testSuite: [cls] }] | | 107 | + }) | | 108 | + ]; | 102 | 109 | } | 103 | 110 | } | 104 | 111 |
| 105 | 112 | return null; | 106 | 113 | } | 107 | 114 |
| 108 | 115 | function getFunctionCodeLens(filePath: string, functionsAndSuites: FunctionsAndSuites, | 109 | | - symbolName: string, range: vscode.Range): vscode.CodeLens { | | 116 | + symbolName: string, range: vscode.Range): vscode.CodeLens[] { | 110 | 117 |
| 111 | 118 | const fn = functionsAndSuites.functions.find(fn => fn.name === symbolName); | 112 | 119 | if (fn) { | 113 | | - return new CodeLens(range, { | 114 | | - title: constants.Text.CodeLensUnitTest, | 115 | | - command: constants.Commands.Tests_Run, | 116 | | - arguments: [<TestsToRun>{ testFunction: [fn] }] | 117 | | - }); | | 120 | + return [ | | 121 | + new CodeLens(range, { | | 122 | + title: constants.Text.CodeLensRunUnitTest, | | 123 | + command: constants.Commands.Tests_Run, | | 124 | + arguments: [<TestsToRun>{ testFunction: [fn] }] | | 125 | + }), | | 126 | + new CodeLens(range, { | | 127 | + title: constants.Text.CodeLensDebugUnitTest, | | 128 | + command: constants.Commands.Tests_Debug, | | 129 | + arguments: [<TestsToRun>{ testFunction: [fn] }] | | 130 | + }) | | 131 | + ]; | 118 | 132 | } | 119 | 133 |
| 120 | 134 | // Ok, possible we're dealing with parameterized unit tests | @@ -124,19 +138,33 @@ function getFunctionCodeLens(filePath: string, functionsAndSuites: FunctionsAndS | 124 | 138 | return null; | 125 | 139 | } | 126 | 140 | if (functions.length === 0) { | 127 | | - return new CodeLens(range, { | 128 | | - title: constants.Text.CodeLensUnitTest, | 129 | | - command: constants.Commands.Tests_Run, | 130 | | - arguments: [<TestsToRun>{ testFunction: functions }] | 131 | | - }); | | 141 | + return [ | | 142 | + new CodeLens(range, { | | 143 | + title: constants.Text.CodeLensRunUnitTest, | | 144 | + command: constants.Commands.Tests_Run, | | 145 | + arguments: [<TestsToRun>{ testFunction: functions }] | | 146 | + }), | | 147 | + new CodeLens(range, { | | 148 | + title: constants.Text.CodeLensDebugUnitTest, | | 149 | + command: constants.Commands.Tests_Debug, | | 150 | + arguments: [<TestsToRun>{ testFunction: functions }] | | 151 | + }) | | 152 | + ]; | 132 | 153 | } | 133 | 154 |
| 134 | 155 | // Find all flattened functions | 135 | | - return new CodeLens(range, { | 136 | | - title: constants.Text.CodeLensUnitTest + ' (Multiple)', | 137 | | - command: constants.Commands.Tests_Picker_UI, | 138 | | - arguments: [filePath, functions] | 139 | | - }); | | 156 | + return [ | | 157 | + new CodeLens(range, { | | 158 | + title: constants.Text.CodeLensRunUnitTest + ' (Multiple)', | | 159 | + command: constants.Commands.Tests_Picker_UI, | | 160 | + arguments: [filePath, functions] | | 161 | + }), | | 162 | + new CodeLens(range, { | | 163 | + title: constants.Text.CodeLensDebugUnitTest + ' (Multiple)', | | 164 | + command: constants.Commands.Tests_Picker_UI_Debug, | | 165 | + arguments: [filePath, functions] | | 166 | + }) | | 167 | + ]; | 140 | 168 | } | 141 | 169 |
| 142 | 170 | function getAllTestSuitesAndFunctionsPerFile(testFile: TestFile): FunctionsAndSuites { | |
Collapse file Copy file name to clipboardExpand all lines: src/client/unittests/common/baseTestManager.ts +6-6Lines changed: 6 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -123,10 +123,10 @@ export abstract class BaseTestManager { | 123 | 123 | return Promise.reject(reason); | 124 | 124 | }); | 125 | 125 | } | 126 | | - abstract discoverTestsImpl(ignoreCache: boolean): Promise<Tests>; | 127 | | - public runTest(testsToRun?: TestsToRun): Promise<Tests>; | 128 | | - public runTest(runFailedTests?: boolean): Promise<Tests>; | 129 | | - public runTest(args: any): Promise<Tests> { | | 126 | + abstract discoverTestsImpl(ignoreCache: boolean, debug?: boolean): Promise<Tests>; | | 127 | + public runTest(testsToRun?: TestsToRun, debug?: boolean): Promise<Tests>; | | 128 | + public runTest(runFailedTests?: boolean, debug?: boolean): Promise<Tests>; | | 129 | + public runTest(args: any, debug?: boolean): Promise<Tests> { | 130 | 130 | let runFailedTests = false; | 131 | 131 | let testsToRun: TestsToRun = null; | 132 | 132 | let moreInfo = { | @@ -177,7 +177,7 @@ export abstract class BaseTestManager { | 177 | 177 | }; | 178 | 178 | }) | 179 | 179 | .then(tests => { | 180 | | - return this.runTestImpl(tests, testsToRun, runFailedTests); | | 180 | + return this.runTestImpl(tests, testsToRun, runFailedTests, debug); | 181 | 181 | }).then(() => { | 182 | 182 | this._status = TestStatus.Idle; | 183 | 183 | this.disposeCancellationToken(); | @@ -198,5 +198,5 @@ export abstract class BaseTestManager { | 198 | 198 | return Promise.reject(reason); | 199 | 199 | }); | 200 | 200 | } | 201 | | - abstract runTestImpl(tests: Tests, testsToRun?: TestsToRun, runFailedTests?: boolean): Promise<any>; | | 201 | + abstract runTestImpl(tests: Tests, testsToRun?: TestsToRun, runFailedTests?: boolean, debug?: boolean): Promise<any>; | 202 | 202 | } |
Collapse file Copy file name to clipboardExpand all lines: src/client/unittests/display/picker.ts +8-5Lines changed: 8 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -30,7 +30,7 @@ export class TestDisplay { | 30 | 30 | }, reject); | 31 | 31 | }); | 32 | 32 | } | 33 | | - public displayFunctionTestPickerUI(rootDirectory: string, fileName: string, testFunctions: TestFunction[]) { | | 33 | + public displayFunctionTestPickerUI(rootDirectory: string, fileName: string, testFunctions: TestFunction[], debug?: boolean) { | 34 | 34 | const tests = getDiscoveredTests(); | 35 | 35 | if (!tests) { | 36 | 36 | return; | @@ -44,7 +44,10 @@ export class TestDisplay { | 44 | 44 | testFunctions.some(testFunc => testFunc.nameToRun === fn.testFunction.nameToRun); | 45 | 45 | }); | 46 | 46 |
| 47 | | - window.showQuickPick(buildItemsForFunctions(rootDirectory, flattenedFunctions), { matchOnDescription: true, matchOnDetail: true }).then(onItemSelected); | | 47 | + window.showQuickPick(buildItemsForFunctions(rootDirectory, flattenedFunctions), | | 48 | + { matchOnDescription: true, matchOnDetail: true }).then(testItem => { | | 49 | + return onItemSelected(testItem, debug); | | 50 | + }); | 48 | 51 | } | 49 | 52 | } | 50 | 53 |
| @@ -93,7 +96,7 @@ function getSummary(tests?: Tests) { | 93 | 96 | function buildItems(rootDirectory: string, tests?: Tests): TestItem[] { | 94 | 97 | const items: TestItem[] = []; | 95 | 98 | items.push({ description: '', label: 'Run All Unit Tests', type: Type.RunAll }); | 96 | | - if (!tests || tests.testFiles.length === 0){ | | 99 | + if (!tests || tests.testFiles.length === 0) { | 97 | 100 | items.push({ description: '', label: 'Discover Unit Tests', type: Type.ReDiscover }); | 98 | 101 | } | 99 | 102 | items.push({ description: '', label: 'Run Unit Test Method ...', type: Type.SelectAndRunMethod }); | @@ -147,7 +150,7 @@ function buildItemsForFunctions(rootDirectory: string, tests: FlattenedTestFunct | 147 | 150 | }); | 148 | 151 | return functionItems; | 149 | 152 | } | 150 | | -function onItemSelected(selection: TestItem) { | | 153 | +function onItemSelected(selection: TestItem, debug?: boolean) { | 151 | 154 | if (!selection || typeof selection.type !== 'number') { | 152 | 155 | return; | 153 | 156 | } | @@ -174,7 +177,7 @@ function onItemSelected(selection: TestItem) { | 174 | 177 | break; | 175 | 178 | } | 176 | 179 | case Type.SelectAndRunMethod: { | 177 | | - cmd = constants.Commands.Tests_Select_And_Run_Method; | | 180 | + cmd = debug ? constants.Commands.Tests_Select_And_Debug_Method : constants.Commands.Tests_Select_And_Run_Method; | 178 | 181 | break; | 179 | 182 | } | 180 | 183 | case Type.RunMethod: { | |
Collapse file Copy file name to clipboardExpand all lines: src/client/unittests/main.ts +9-6Lines changed: 9 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -59,13 +59,16 @@ function registerCommands(): vscode.Disposable[] { | 59 | 59 | })); | 60 | 60 | disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_Run_Failed, () => runTestsImpl(true))); | 61 | 61 | disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_Run, (testId) => runTestsImpl(testId))); | | 62 | + disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_Debug, (testId) => runTestsImpl(testId, true))); | 62 | 63 | disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_View_UI, () => displayUI())); | 63 | 64 | disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_Picker_UI, (file, testFunctions) => displayPickerUI(file, testFunctions))); | | 65 | + disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_Picker_UI_Debug, (file, testFunctions) => displayPickerUI(file, testFunctions, true))); | 64 | 66 | disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_Stop, () => stopTests())); | 65 | 67 | disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_ViewOutput, () => outChannel.show())); | 66 | 68 | disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_Ask_To_Stop_Discovery, () => displayStopUI('Stop discovering tests'))); | 67 | 69 | disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_Ask_To_Stop_Test, () => displayStopUI('Stop running tests'))); | 68 | 70 | disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_Select_And_Run_Method, () => selectAndRunTestMethod())); | | 71 | + disposables.push(vscode.commands.registerCommand(constants.Commands.Tests_Select_And_Debug_Method, () => selectAndRunTestMethod(true))); | 69 | 72 |
| 70 | 73 | return disposables; | 71 | 74 | } | @@ -79,16 +82,16 @@ function displayUI() { | 79 | 82 | testDisplay = testDisplay ? testDisplay : new TestDisplay(); | 80 | 83 | testDisplay.displayTestUI(vscode.workspace.rootPath); | 81 | 84 | } | 82 | | -function displayPickerUI(file: string, testFunctions: TestFunction[]) { | | 85 | +function displayPickerUI(file: string, testFunctions: TestFunction[], debug?: boolean) { | 83 | 86 | let testManager = getTestRunner(); | 84 | 87 | if (!testManager) { | 85 | 88 | return displayTestFrameworkError(outChannel); | 86 | 89 | } | 87 | 90 |
| 88 | 91 | testDisplay = testDisplay ? testDisplay : new TestDisplay(); | 89 | | - testDisplay.displayFunctionTestPickerUI(vscode.workspace.rootPath, file, testFunctions); | | 92 | + testDisplay.displayFunctionTestPickerUI(vscode.workspace.rootPath, file, testFunctions, debug); | 90 | 93 | } | 91 | | -function selectAndRunTestMethod() { | | 94 | +function selectAndRunTestMethod(debug?: boolean) { | 92 | 95 | let testManager = getTestRunner(); | 93 | 96 | if (!testManager) { | 94 | 97 | return displayTestFrameworkError(outChannel); | @@ -97,7 +100,7 @@ function selectAndRunTestMethod() { | 97 | 100 | const tests = getDiscoveredTests(); | 98 | 101 | testDisplay = testDisplay ? testDisplay : new TestDisplay(); | 99 | 102 | testDisplay.selectTestFunction(vscode.workspace.rootPath, tests).then(testFn => { | 100 | | - runTestsImpl(testFn); | | 103 | + runTestsImpl(testFn, debug); | 101 | 104 | }).catch(() => { }); | 102 | 105 | }); | 103 | 106 | } | @@ -223,7 +226,7 @@ function identifyTestType(rootDirectory: string, arg?: vscode.Uri | TestsToRun | | 223 | 226 | } | 224 | 227 | return null; | 225 | 228 | } | 226 | | -function runTestsImpl(arg?: vscode.Uri | TestsToRun | boolean | FlattenedTestFunction) { | | 229 | +function runTestsImpl(arg?: vscode.Uri | TestsToRun | boolean | FlattenedTestFunction, debug: boolean = false) { | 227 | 230 | let testManager = getTestRunner(); | 228 | 231 | if (!testManager) { | 229 | 232 | return displayTestFrameworkError(outChannel); | @@ -234,7 +237,7 @@ function runTestsImpl(arg?: vscode.Uri | TestsToRun | boolean | FlattenedTestFun | 234 | 237 |
| 235 | 238 | testResultDisplay = testResultDisplay ? testResultDisplay : new TestResultDisplay(outChannel); | 236 | 239 |
| 237 | | - let runPromise = testManager.runTest(runInfo).catch(reason => { | | 240 | + let runPromise = testManager.runTest(runInfo, debug).catch(reason => { | 238 | 241 | if (reason !== CANCELLATION_REASON) { | 239 | 242 | outChannel.appendLine('Error: ' + reason); | 240 | 243 | } | |
Collapse file Copy file name to clipboardExpand all lines: src/client/unittests/nosetest/main.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ export class TestManager extends BaseTestManager { | 18 | 18 | let args = settings.unitTest.nosetestArgs.slice(0); | 19 | 19 | return discoverTests(this.rootDirectory, args, this.cancellationToken); | 20 | 20 | } | 21 | | - runTestImpl(tests: Tests, testsToRun?: TestsToRun, runFailedTests?: boolean): Promise<any> { | | 21 | + runTestImpl(tests: Tests, testsToRun?: TestsToRun, runFailedTests?: boolean, debug?: boolean): Promise<any> { | 22 | 22 | let args = settings.unitTest.nosetestArgs.slice(0); | 23 | 23 | if (runFailedTests === true && args.indexOf('--failed') === -1) { | 24 | 24 | args.push('--failed'); | |
Collapse file Copy file name to clipboardExpand all lines: src/client/unittests/pytest/main.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,7 @@ export class TestManager extends BaseTestManager { | 16 | 16 | let args = settings.unitTest.pyTestArgs.slice(0); | 17 | 17 | return discoverTests(this.rootDirectory, args, this.cancellationToken, ignoreCache); | 18 | 18 | } | 19 | | - runTestImpl(tests: Tests, testsToRun?: TestsToRun, runFailedTests?: boolean): Promise<any> { | | 19 | + runTestImpl(tests: Tests, testsToRun?: TestsToRun, runFailedTests?: boolean, debug?: boolean): Promise<any> { | 20 | 20 | let args = settings.unitTest.pyTestArgs.slice(0); | 21 | 21 | if (runFailedTests === true && args.indexOf('--lf') === -1 && args.indexOf('--last-failed') === -1) { | 22 | 22 | args.push('--last-failed'); | |
|