File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -517,33 +517,29 @@ describe('PythonShell', function () {
517517 } ) ;
518518 } ) ;
519519
520- describe ( '.terminate ()' , function ( ) {
521- it ( 'set terminated to true ' , function ( done ) {
520+ describe ( '.kill ()' , function ( ) {
521+ it ( 'set terminated to correct value ' , function ( done ) {
522522 let pyshell = new PythonShell ( 'infinite_loop.py' ) ;
523- pyshell . terminate ( ) ;
523+ pyshell . kill ( ) ;
524524 pyshell . terminated . should . be . true
525525 done ( ) ;
526526 } ) ;
527527 it ( 'run the end callback if specified' , function ( done ) {
528528 let pyshell = new PythonShell ( 'infinite_loop.py' ) ;
529- let endCalled = false ;
530529 pyshell . end ( ( ) => {
531- endCalled = true ;
530+ done ( ) ;
532531 } )
533- pyshell . terminate ( ) ;
534- pyshell . terminated . should . be . true
535- done ( ) ;
532+ pyshell . kill ( ) ;
536533 } ) ;
537534 it ( 'kill with correct signal' , function ( done ) {
538535 let pyshell = new PythonShell ( 'infinite_loop.py' ) ;
539- let endCalled = false ;
540- pyshell . end ( ( ) => {
541- endCalled = true ;
542- } )
536+ pyshell . terminated . should . be . false ;
543537 pyshell . kill ( 'SIGKILL' ) ;
544538 pyshell . terminated . should . be . true ;
545- setTimeout ( ( ) => { pyshell . exitSignal . should . be . exactly ( 'SIGKILL' ) ; } , 500 ) ;
546- done ( ) ;
539+ setTimeout ( ( ) => {
540+ pyshell . exitSignal . should . be . exactly ( 'SIGKILL' ) ;
541+ done ( ) ;
542+ } , 500 ) ;
547543 } ) ;
548544 } ) ;
549545} ) ;
You can’t perform that action at this time.
0 commit comments