@@ -40,12 +40,13 @@ suite('Run without Debugging', () => {
40
40
} catch ( ex ) { }
41
41
await sleep ( 1000 ) ;
42
42
} ) ;
43
- function buildLauncArgs ( pythonFile : string , stopOnEntry : boolean = false ) : LaunchRequestArguments {
43
+ function buildLaunchArgs ( pythonFile : string , stopOnEntry : boolean = false , showReturnValue : boolean = false ) : LaunchRequestArguments {
44
44
// tslint:disable-next-line:no-unnecessary-local-variable
45
45
return {
46
46
program : path . join ( debugFilesPath , pythonFile ) ,
47
47
cwd : debugFilesPath ,
48
48
stopOnEntry,
49
+ showReturnValue,
49
50
noDebug : true ,
50
51
debugOptions : [ DebugOptions . RedirectOutput ] ,
51
52
pythonPath : PYTHON_PATH ,
@@ -62,15 +63,15 @@ suite('Run without Debugging', () => {
62
63
test ( 'Should run program to the end' , async ( ) => {
63
64
await Promise . all ( [
64
65
debugClient . configurationSequence ( ) ,
65
- debugClient . launch ( buildLauncArgs ( 'simplePrint.py' , false ) ) ,
66
+ debugClient . launch ( buildLaunchArgs ( 'simplePrint.py' , false ) ) ,
66
67
debugClient . waitForEvent ( 'initialized' ) ,
67
68
debugClient . waitForEvent ( 'terminated' )
68
69
] ) ;
69
70
} ) ;
70
71
test ( 'test stderr output for Python' , async ( ) => {
71
72
await Promise . all ( [
72
73
debugClient . configurationSequence ( ) ,
73
- debugClient . launch ( buildLauncArgs ( 'stdErrOutput.py' , false ) ) ,
74
+ debugClient . launch ( buildLaunchArgs ( 'stdErrOutput.py' , false ) ) ,
74
75
debugClient . waitForEvent ( 'initialized' ) ,
75
76
debugClient . assertOutput ( 'stderr' , 'error output' ) ,
76
77
debugClient . waitForEvent ( 'terminated' )
@@ -79,7 +80,7 @@ suite('Run without Debugging', () => {
79
80
test ( 'Test stdout output' , async ( ) => {
80
81
await Promise . all ( [
81
82
debugClient . configurationSequence ( ) ,
82
- debugClient . launch ( buildLauncArgs ( 'stdOutOutput.py' , false ) ) ,
83
+ debugClient . launch ( buildLaunchArgs ( 'stdOutOutput.py' , false ) ) ,
83
84
debugClient . waitForEvent ( 'initialized' ) ,
84
85
debugClient . assertOutput ( 'stdout' , 'normal output' ) ,
85
86
debugClient . waitForEvent ( 'terminated' )
@@ -102,7 +103,7 @@ suite('Run without Debugging', () => {
102
103
} ) ;
103
104
await Promise . all ( [
104
105
debugClient . configurationSequence ( ) ,
105
- debugClient . launch ( buildLauncArgs ( 'sampleWithSleep.py' , false ) ) ,
106
+ debugClient . launch ( buildLaunchArgs ( 'sampleWithSleep.py' , false ) ) ,
106
107
debugClient . waitForEvent ( 'initialized' ) ,
107
108
processIdOutput
108
109
] ) ;
0 commit comments