Skip to content

Commit df531b1

Browse files
committed
Add test to check whether -e requirements are correctly packaged.
Previously, requirements with the -e flag where completely ignored serverless#36 With the latest patch, the -e flag are stripped out, but the requirement itself is preserved. This patch adds a check to test this desired behavior.
1 parent 1bb2ce3 commit df531b1

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

test.js

+15
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,21 @@ test(
376376
{ skip: !hasPython(3) }
377377
);
378378

379+
test('py3.6 can package boto3 with editable', t => {
380+
process.chdir('tests/base');
381+
const path = npm(['pack', '../..']);
382+
npm(['i', path]);
383+
sls([
384+
`--pythonBin=${getPythonBin(3)}`,
385+
'--fileName=requirements-w-editable.txt',
386+
'package'
387+
]);
388+
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
389+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
390+
t.true(zipfiles.includes(`botocore${sep}__init__.py`), 'botocore is packaged');
391+
t.end();
392+
});
393+
379394
test(
380395
'py3.6 can package flask with dockerizePip option',
381396
async t => {
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-e https://github.com/boto3/boto3#egg=boto3

0 commit comments

Comments
 (0)