@@ -257,7 +257,10 @@ describe('PythonShell', function () {
257
257
// * inherit - inherit fd from parent process;
258
258
// * process.stderr - pass output directly to that stream.
259
259
stdio : [ 'ignore' , 'inherit' , process . stderr ] ,
260
- args : [ "0" ]
260
+ // @ts -expect-error python-shell technically allows a non-array arg,
261
+ // although the user shouldn't be doing this. We are just testing for
262
+ // increased code coverage
263
+ args : "0"
261
264
} , done ) ;
262
265
263
266
should ( pyshell . stdin ) . be . eql ( null ) ;
@@ -376,7 +379,7 @@ describe('PythonShell', function () {
376
379
args : [ 'hello' , 'world' ] ,
377
380
mode : 'binary'
378
381
} ) ;
379
- pyshell . on ( 'message' , ( ) => {
382
+ pyshell . on ( 'message' , ( ) => {
380
383
done ( 'should not emit messages in binary mode' ) ;
381
384
return undefined
382
385
} ) ;
@@ -418,10 +421,10 @@ describe('PythonShell', function () {
418
421
let pyshell = new PythonShell ( 'stderrLogging.py' , {
419
422
stderrParser : 'binary'
420
423
} ) ;
421
- pyshell . on ( 'stderr' , ( ) => {
424
+ pyshell . on ( 'stderr' , ( ) => {
422
425
done ( 'should not emit stderr in binary mode' ) ;
423
426
} ) ;
424
- pyshell . end ( ( ) => {
427
+ pyshell . end ( ( ) => {
425
428
done ( )
426
429
} ) ;
427
430
} ) ;
@@ -504,7 +507,7 @@ describe('PythonShell', function () {
504
507
} ) ;
505
508
} ) ;
506
509
it ( 'should work in json mode' , function ( done ) {
507
- let pyshell = new PythonShell ( 'error.py' , { mode : 'json' } ) ;
510
+ let pyshell = new PythonShell ( 'error.py' , { mode : 'json' } ) ;
508
511
pyshell . on ( 'pythonError' , function ( err ) {
509
512
err . stack . should . containEql ( '----- Python Traceback -----' ) ;
510
513
err . stack . should . containEql ( 'File "test' + sep + 'python' + sep + 'error.py", line 4' ) ;
0 commit comments