Skip to content

Commit 2a5ee08

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 63324e5 commit 2a5ee08

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,21 @@ test('py3.6 can package flask with nested', t => {
188188
t.end();
189189
});
190190

191+
test('py3.6 can package boto3 with editable', t => {
192+
process.chdir('tests/base');
193+
const path = npm(['pack', '../..']);
194+
npm(['i', path]);
195+
sls([
196+
`--pythonBin=${getPythonBin(3)}`,
197+
'--fileName=requirements-w-editable.txt',
198+
'package'
199+
]);
200+
const zipfiles = listZipFiles('.serverless/sls-py-req-test.zip');
201+
t.true(zipfiles.includes(`boto3${sep}__init__.py`), 'boto3 is packaged');
202+
t.true(zipfiles.includes(`botocore${sep}__init__.py`), 'botocore is packaged');
203+
t.end();
204+
});
205+
191206
test('py3.6 can package flask with zip option', t => {
192207
process.chdir('tests/base');
193208
const path = npm(['pack', '../..']);
Lines changed: 1 addition & 0 deletions
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)