Skip to content

Commit 99a4411

Browse files
author
bweigel
committed
merge
2 parents a77e823 + c95729e commit 99a4411

File tree

1 file changed

+0
-107
lines changed

1 file changed

+0
-107
lines changed

test.js

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -501,97 +501,6 @@ test('can package individually, moving modules to root of zip-File with Individu
501501
t.end();
502502
});
503503

504-
test('can package individually, moving modules to root of zip-File with IndividuallyMoveUpModules=true', t => {
505-
process.chdir('tests/base');
506-
const path = npm(['pack', '../..']);
507-
npm(['i', path]);
508-
sls(['--individually=true', '--moveup=true', 'package']);
509-
510-
const zipfiles_hello = listZipFiles('.serverless/hello.zip');
511-
t.false(
512-
zipfiles_hello.includes(`fn2${sep}__init__.py`),
513-
'fn2 is not packaged in function hello'
514-
);
515-
t.true(
516-
zipfiles_hello.includes('handler.py'),
517-
'handler.py is packaged in function hello'
518-
);
519-
t.false(
520-
zipfiles_hello.includes(`dataclasses.py`),
521-
'dataclasses is not packaged in function hello'
522-
);
523-
t.true(
524-
zipfiles_hello.includes(`flask${sep}__init__.py`),
525-
'flask is packaged in function hello'
526-
);
527-
528-
const zipfiles_hello4 = listZipFiles(
529-
'.serverless/fn2-sls-py-req-test-dev-hello4.zip'
530-
);
531-
t.true(
532-
zipfiles_hello4.includes(`other.py`),
533-
'fn2 is moved to root in function hello4'
534-
);
535-
t.true(
536-
zipfiles_hello4.includes(`dataclasses.py`),
537-
'dataclasses is packaged in function hello4'
538-
);
539-
t.false(
540-
zipfiles_hello4.includes(`flask${sep}__init__.py`),
541-
'flask is not packaged in function hello4'
542-
);
543-
t.false(
544-
zipfiles_hello4.includes(`common${sep}__init__.py`),
545-
'module common is not packaged in function hello4'
546-
);
547-
548-
const zipfiles_hello5 = listZipFiles(
549-
'.serverless/fn2-sls-py-req-test-dev-hello5.zip'
550-
);
551-
t.true(
552-
zipfiles_hello5.includes(`other.py`),
553-
'fn2 is moved to root in function hello5'
554-
);
555-
t.true(
556-
zipfiles_hello5.includes(`dataclasses.py`),
557-
'dataclasses is packaged in function hello5'
558-
);
559-
t.false(
560-
zipfiles_hello5.includes(`flask${sep}__init__.py`),
561-
'flask is not packaged in function hello5'
562-
);
563-
t.true(
564-
zipfiles_hello5.includes(`common${sep}__init__.py`),
565-
'module common is packaged in function hello5'
566-
);
567-
568-
const zipfiles_hello6 = listZipFiles(
569-
'.serverless/fn3-sls-py-req-test-dev-hello6.zip'
570-
);
571-
t.true(
572-
zipfiles_hello6.includes(`fn3_handler.py`),
573-
'fn3 is moved to root in function hello6'
574-
);
575-
t.false(
576-
zipfiles_hello6.includes(`fn2${sep}__init__.py`),
577-
'fn2 is not packaged in function hello6'
578-
);
579-
t.false(
580-
zipfiles_hello6.includes(`dataclasses.py`),
581-
'dataclasses is packaged in function hello6'
582-
);
583-
t.false(
584-
zipfiles_hello6.includes(`flask${sep}__init__.py`),
585-
'flask is not packaged in function hello6'
586-
);
587-
t.true(
588-
zipfiles_hello6.includes(`common${sep}__init__.py`),
589-
'module common is packaged in function hello6'
590-
);
591-
592-
t.end();
593-
});
594-
595504
test('py3.6 uses download cache with useDownloadCache option', t => {
596505
process.chdir('tests/base');
597506
const path = npm(['pack', '../..']);
@@ -660,19 +569,3 @@ test("py3.6 doesn't package bottle with zip option", t => {
660569
);
661570
t.end();
662571
});
663-
664-
test('can package individually without moving modules to root of zip-File', t => {
665-
process.chdir('tests/base');
666-
const path = npm(['pack', '../..']);
667-
npm(['i', path]);
668-
sls(['--individually=true', '--moveup=false', 'package']);
669-
const zipfiles = listZipFiles(
670-
'.serverless/fn2-sls-py-req-test-dev-hello4.zip'
671-
);
672-
t.true(
673-
zipfiles.includes(`fn2${sep}__init__.py`),
674-
'fn2 is packaged as module'
675-
);
676-
t.true(zipfiles.includes(`flask${sep}__init__.py`), 'flask is packaged');
677-
t.end();
678-
});

0 commit comments

Comments
 (0)