@@ -7,7 +7,6 @@ import { expect, use } from 'chai';
7
7
import * as chaiAsPromised from 'chai-as-promised' ;
8
8
import { execFile } from 'child_process' ;
9
9
import * as fs from 'fs-extra' ;
10
- import { EOL } from 'os' ;
11
10
import * as path from 'path' ;
12
11
import { ConfigurationTarget , Uri } from 'vscode' ;
13
12
import { IPythonExecutionFactory , StdErrError } from '../../../client/common/process/types' ;
@@ -75,12 +74,12 @@ suite('PythonExecutableService', () => {
75
74
test ( 'Importing with a valid PYTHONPATH from .env file should succeed' , async ( ) => {
76
75
await configService . updateSetting ( 'envFile' , undefined , workspace4PyFile , ConfigurationTarget . WorkspaceFolder ) ;
77
76
const pythonExecService = await pythonExecFactory . create ( { resource : workspace4PyFile } ) ;
78
- const promise = pythonExecService . exec ( [ workspace4PyFile . fsPath ] , {
77
+ const result = await pythonExecService . exec ( [ workspace4PyFile . fsPath ] , {
79
78
cwd : path . dirname ( workspace4PyFile . fsPath ) ,
80
79
throwOnStdErr : true ,
81
80
} ) ;
82
81
83
- await expect ( promise ) . to . eventually . have . property ( 'stdout' , `Hello ${ EOL } ` ) ;
82
+ expect ( result . stdout . startsWith ( 'Hello' ) ) . to . be . equals ( true ) ;
84
83
} ) . timeout ( TEST_TIMEOUT * 3 ) ;
85
84
86
85
test ( "Known modules such as 'os' and 'sys' should be deemed 'installed'" , async ( ) => {
0 commit comments