@@ -170,6 +170,21 @@ test('py3.6 can package flask with hashes', t => {
170170 t . end ( ) ;
171171} ) ;
172172
173+ test ( 'py3.6 can package flask with nested' , t => {
174+ process . chdir ( 'tests/base' ) ;
175+ const path = npm ( [ 'pack' , '../..' ] ) ;
176+ npm ( [ 'i' , path ] ) ;
177+ sls ( [
178+ `--pythonBin=${ getPythonBin ( 3 ) } ` ,
179+ '--fileName=requirements-w-nested.txt' ,
180+ 'package'
181+ ] ) ;
182+ const zipfiles = listZipFiles ( '.serverless/sls-py-req-test.zip' ) ;
183+ t . true ( zipfiles . includes ( `flask${ sep } __init__.py` ) , 'flask is packaged' ) ;
184+ t . true ( zipfiles . includes ( `boto3${ sep } __init__.py` ) , 'boto3 is packaged' ) ;
185+ t . end ( ) ;
186+ } ) ;
187+
173188test ( 'py3.6 can package flask with zip option' , t => {
174189 process . chdir ( 'tests/base' ) ;
175190 const path = npm ( [ 'pack' , '../..' ] ) ;
@@ -1471,6 +1486,10 @@ test('py3.6 can package only requirements of module', t => {
14711486 zipfiles_hello . includes ( `pyaml${ sep } __init__.py` ) ,
14721487 'pyaml is packaged in function hello1'
14731488 ) ;
1489+ t . true (
1490+ zipfiles_hello . includes ( `boto3${ sep } __init__.py` ) ,
1491+ 'boto3 is packaged in function hello1'
1492+ ) ;
14741493 t . false (
14751494 zipfiles_hello . includes ( `flask${ sep } __init__.py` ) ,
14761495 'flask is NOT packaged in function hello1'
@@ -1491,6 +1510,10 @@ test('py3.6 can package only requirements of module', t => {
14911510 zipfiles_hello2 . includes ( `pyaml${ sep } __init__.py` ) ,
14921511 'pyaml is NOT packaged in function hello2'
14931512 ) ;
1513+ t . false (
1514+ zipfiles_hello2 . includes ( `boto3${ sep } __init__.py` ) ,
1515+ 'boto3 is NOT packaged in function hello2'
1516+ ) ;
14941517 t . true (
14951518 zipfiles_hello2 . includes ( `flask${ sep } __init__.py` ) ,
14961519 'flask is packaged in function hello2'
0 commit comments