Skip to content

Commit 0dee94c

Browse files
committed
Add test to check whether -e requirements are correctly packaged.
Previously, requirements with the -e flag where completely ignored #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 91a6fc6 commit 0dee94c

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

test.js

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

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

0 commit comments

Comments
 (0)