Skip to content

Commit 93cf27d

Browse files
committed
test proving bug #261 with pip-tools
1 parent 2d13f13 commit 93cf27d

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

circle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# other deps
2525
- run: sudo apt -y update && sudo apt -y install python-pip python2.7 curl unzip
2626
# instal pipenv
27-
- run: sudo python3.6 -m pip install pipenv
27+
- run: sudo python3.6 -m pip install pipenv pip-tools
2828
# install nodejs
2929
- run: curl -sL https://deb.nodesource.com/setup_6.x | sudo bash - && sudo apt -y install nodejs
3030
# install serverless & depcheck

test.bats

+9
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ teardown() {
5050
ls puck/flask
5151
}
5252

53+
@test "py3.6 can package flask with hashes" {
54+
cd tests/base
55+
npm i $(npm pack ../..)
56+
pip-compile --output-file requirements-w-hashes.txt --generate-hashes requirements.txt
57+
sls package --fileName requirements-w-hashes.txt
58+
unzip .serverless/sls-py-req-test.zip -d puck
59+
ls puck/flask
60+
}
61+
5362
@test "py3.6 can package flask & bottle with zip option" {
5463
cd tests/base
5564
npm i $(npm pack ../..)

tests/base/serverless.yml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ custom:
1313
slim: ${opt:slim, self:custom.defaults.slim}
1414
slimPatterns: ${file(./slimPatterns.yml):slimPatterns, self:custom.defaults.slimPatterns}
1515
vendor: ${opt:vendor, ''}
16+
fileName: ${opt:fileName, 'requirements.txt'}
1617
defaults:
1718
slim: false
1819
slimPatterns: false

0 commit comments

Comments
 (0)