File tree 2 files changed +27
-1
lines changed
2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -376,6 +376,26 @@ teardown() {
376
376
! ls puck2/pyaml
377
377
}
378
378
379
+ @test " py2.7 can package module requirements with zip option" {
380
+ cd tests/individually
381
+ npm i $( npm pack ../..)
382
+ sls --zip=true --runtime=python2.7 package
383
+ unzip .serverless/hello1.zip -d puck
384
+ unzip .serverless/hello2.zip -d puck2
385
+ ls puck/.requirements.zip puck/unzip_requirements.py
386
+ ls puck2/.requirements.zip puck2/unzip_requirements.py
387
+ }
388
+
389
+ @test " py3.6 can package module requirements with zip option" {
390
+ cd tests/individually
391
+ npm i $( npm pack ../..)
392
+ sls --zip=true package
393
+ unzip .serverless/hello1.zip -d puck
394
+ unzip .serverless/hello2.zip -d puck2
395
+ ls puck/.requirements.zip puck/unzip_requirements.py
396
+ ls puck2/.requirements.zip puck2/unzip_requirements.py
397
+ }
398
+
379
399
@test " py3.6 can package lambda-decorators using vendor option" {
380
400
cd tests/base
381
401
npm i $( npm pack ../..)
Original file line number Diff line number Diff line change @@ -2,11 +2,17 @@ service: sls-py-req-test-indiv
2
2
3
3
provider :
4
4
name : aws
5
- runtime : python3.6
5
+ runtime : ${opt:runtime, ' python3.6'}
6
6
7
7
package :
8
8
individually : true
9
9
10
+ custom :
11
+ pythonRequirements :
12
+ zip : ${opt:zip, self:custom.defaults.zip}
13
+ defaults :
14
+ zip : false
15
+
10
16
functions :
11
17
hello1 :
12
18
handler : handler1.hello
You can’t perform that action at this time.
0 commit comments