@@ -257,7 +257,10 @@ describe('PythonShell', function () {
257257 // * inherit - inherit fd from parent process;
258258 // * process.stderr - pass output directly to that stream.
259259 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"
261264 } , done ) ;
262265
263266 should ( pyshell . stdin ) . be . eql ( null ) ;
@@ -376,7 +379,7 @@ describe('PythonShell', function () {
376379 args : [ 'hello' , 'world' ] ,
377380 mode : 'binary'
378381 } ) ;
379- pyshell . on ( 'message' , ( ) => {
382+ pyshell . on ( 'message' , ( ) => {
380383 done ( 'should not emit messages in binary mode' ) ;
381384 return undefined
382385 } ) ;
@@ -418,10 +421,10 @@ describe('PythonShell', function () {
418421 let pyshell = new PythonShell ( 'stderrLogging.py' , {
419422 stderrParser : 'binary'
420423 } ) ;
421- pyshell . on ( 'stderr' , ( ) => {
424+ pyshell . on ( 'stderr' , ( ) => {
422425 done ( 'should not emit stderr in binary mode' ) ;
423426 } ) ;
424- pyshell . end ( ( ) => {
427+ pyshell . end ( ( ) => {
425428 done ( )
426429 } ) ;
427430 } ) ;
@@ -504,7 +507,7 @@ describe('PythonShell', function () {
504507 } ) ;
505508 } ) ;
506509 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' } ) ;
508511 pyshell . on ( 'pythonError' , function ( err ) {
509512 err . stack . should . containEql ( '----- Python Traceback -----' ) ;
510513 err . stack . should . containEql ( 'File "test' + sep + 'python' + sep + 'error.py", line 4' ) ;
0 commit comments