Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5f526b7

Browse files
committed
add test for pythonPath
1 parent 74d0b63 commit 5f526b7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎test/test-python-shell.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ describe('PythonShell', function () {
5555
pyshell.command.should.eql(['-u', 'test' + sep + 'python' + sep + 'exit-code.py']);
5656
pyshell.end(done);
5757
});
58+
it('should fail to spawn python with bad path', function (done) {
59+
let pyshell = new PythonShell('exit-code.py', {
60+
pythonPath: 'foeisjofseij'
61+
}, );
62+
pyshell.on('error', (err: NodeJS.ErrnoException)=>{
63+
err.code.should.eql('ENOENT')
64+
done()
65+
})
66+
});
5867
it('should spawn a Python process with script arguments', function (done) {
5968
let pyshell = new PythonShell('echo_args.py', {
6069
args: ['hello', 'world']

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /