mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
more tests
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
# Detect Python-version with Pipenv.
|
||||
|
||||
if [[ -f $BUILD_DIR/Pipfile.lock ]]; then
|
||||
if [[ -f $BUILD_DIR/Pipfile ]]; then
|
||||
|
||||
if [[ ! -f $BUILD_DIR/runtime.txt ]]; then
|
||||
if [[ ! -f Pipfile.lock ]]; then
|
||||
pipenv lock 2> /dev/null
|
||||
puts-step "Pipfile.lock not found, creating..."
|
||||
/app/.heroku/python/bin/pipenv lock 2> /dev/null
|
||||
fi
|
||||
|
||||
set +e
|
||||
|
||||
+3
-1
@@ -39,7 +39,9 @@ if [ ! "$SKIP_INSTALL" ]; then
|
||||
fi
|
||||
|
||||
# If Pip isn't up to date:
|
||||
if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_VERSION* ]]; then
|
||||
if [ "$FRESH_PYTHON" ] || pip list -o --format=legacy --disable-pip-version-check | grep '^pip' 2>&1 /dev/null; then
|
||||
|
||||
# TODO: automatically detect pip is out of date with 'pip list -o --format=legacy --disable-pip-version-check | grep '^pip''
|
||||
WORKING_DIR=$(pwd)
|
||||
|
||||
TMPTARDIR=$(mktemp -d)
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
wordnet
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
nltk
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"default": {
|
||||
"requests": {
|
||||
"version": "==2.13.0",
|
||||
"hash": "sha256:1a720e8862a41aa22e339373b526f508ef0c8988baf48b84d3fc891a8e237efb"
|
||||
}
|
||||
},
|
||||
"develop": {},
|
||||
"_meta": {
|
||||
"sources": [
|
||||
{
|
||||
"url": "https://pypi.python.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
],
|
||||
"requires": {
|
||||
"python_version": "3.6"
|
||||
},
|
||||
"hash": {
|
||||
"sha256": "5866990104fc8f27d13cdf01abc2a32c553129e03f666316cacc5b42d3e0884e"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
|
||||
testNoRequirements() {
|
||||
compile "no-requirements"
|
||||
assertCapturedError
|
||||
}
|
||||
|
||||
|
||||
testNLTK() {
|
||||
compile "nltk"
|
||||
assertCaptured "wordnet"
|
||||
assertCapturedSuccess
|
||||
|
||||
}
|
||||
|
||||
|
||||
testPipenvVersion() {
|
||||
compile "pipenv-version"
|
||||
assertCaptured "3.6.0"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
|
||||
testPipenv() {
|
||||
compile "pipenv"
|
||||
assertCapturedSuccess
|
||||
|
||||
Reference in New Issue
Block a user