@@ -440,6 +440,28 @@ describe('AwsInvokeLocal', () => {
440
440
) . to . be . equal ( true ) ;
441
441
} ) ;
442
442
443
+ it ( 'should call invokeLocalPython when python3.9 runtime is set' , async ( ) => {
444
+ awsInvokeLocal . options . functionObj . runtime = 'python3.9' ;
445
+ await awsInvokeLocal . invokeLocal ( ) ;
446
+ // NOTE: this is important so that tests on Windows won't fail
447
+ const runtime = process . platform === 'win32' ? 'python.exe' : 'python3.9' ;
448
+ expect ( invokeLocalPythonStub . calledOnce ) . to . be . equal ( true ) ;
449
+ expect (
450
+ invokeLocalPythonStub . calledWithExactly ( runtime , 'handler' , 'hello' , { } , undefined )
451
+ ) . to . be . equal ( true ) ;
452
+ } ) ;
453
+
454
+ it ( 'should call invokeLocalPython when python3.10 runtime is set' , async ( ) => {
455
+ awsInvokeLocal . options . functionObj . runtime = 'python3.10' ;
456
+ await awsInvokeLocal . invokeLocal ( ) ;
457
+ // NOTE: this is important so that tests on Windows won't fail
458
+ const runtime = process . platform === 'win32' ? 'python.exe' : 'python3.10' ;
459
+ expect ( invokeLocalPythonStub . calledOnce ) . to . be . equal ( true ) ;
460
+ expect (
461
+ invokeLocalPythonStub . calledWithExactly ( runtime , 'handler' , 'hello' , { } , undefined )
462
+ ) . to . be . equal ( true ) ;
463
+ } ) ;
464
+
443
465
it ( 'should call invokeLocalPython when python3.11 runtime is set' , async ( ) => {
444
466
awsInvokeLocal . options . functionObj . runtime = 'python3.11' ;
445
467
await awsInvokeLocal . invokeLocal ( ) ;
@@ -451,6 +473,28 @@ describe('AwsInvokeLocal', () => {
451
473
) . to . be . equal ( true ) ;
452
474
} ) ;
453
475
476
+ it ( 'should call invokeLocalPython when python3.12 runtime is set' , async ( ) => {
477
+ awsInvokeLocal . options . functionObj . runtime = 'python3.12' ;
478
+ await awsInvokeLocal . invokeLocal ( ) ;
479
+ // NOTE: this is important so that tests on Windows won't fail
480
+ const runtime = process . platform === 'win32' ? 'python.exe' : 'python3.12' ;
481
+ expect ( invokeLocalPythonStub . calledOnce ) . to . be . equal ( true ) ;
482
+ expect (
483
+ invokeLocalPythonStub . calledWithExactly ( runtime , 'handler' , 'hello' , { } , undefined )
484
+ ) . to . be . equal ( true ) ;
485
+ } ) ;
486
+
487
+ it ( 'should call invokeLocalPython when python3.13 runtime is set' , async ( ) => {
488
+ awsInvokeLocal . options . functionObj . runtime = 'python3.13' ;
489
+ await awsInvokeLocal . invokeLocal ( ) ;
490
+ // NOTE: this is important so that tests on Windows won't fail
491
+ const runtime = process . platform === 'win32' ? 'python.exe' : 'python3.13' ;
492
+ expect ( invokeLocalPythonStub . calledOnce ) . to . be . equal ( true ) ;
493
+ expect (
494
+ invokeLocalPythonStub . calledWithExactly ( runtime , 'handler' , 'hello' , { } , undefined )
495
+ ) . to . be . equal ( true ) ;
496
+ } ) ;
497
+
454
498
it ( 'should call invokeLocalJava when java8 runtime is set' , async ( ) => {
455
499
awsInvokeLocal . options . functionObj . runtime = 'java8' ;
456
500
await awsInvokeLocal . invokeLocal ( ) ;
0 commit comments