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