Skip to content

Commit c847ede

Browse files
committed
test proving bug #261 with pip-tools
1 parent e06c829 commit c847ede

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
@@ -35,6 +35,15 @@ teardown() {
3535
ls puck/flask
3636
}
3737

38+
@test "py3.6 can package flask with hashes" {
39+
cd tests/base
40+
npm i $(npm pack ../..)
41+
pip-compile --output-file requirements-w-hashes.txt --generate-hashes requirements.txt
42+
sls package --fileName requirements-w-hashes.txt
43+
unzip .serverless/sls-py-req-test.zip -d puck
44+
ls puck/flask
45+
}
46+
3847
@test "py3.6 can package flask & bottle with zip option" {
3948
cd tests/base
4049
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)