mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
84 lines
1.5 KiB
Bash
Executable File
84 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
#
|
|
# Create a Heroku app with the following buildpack:
|
|
# https://github.com/ddollar/buildpack-tet
|
|
#
|
|
# Push this Python buildpack to that Heroku app to
|
|
# run the tests.
|
|
#
|
|
|
|
testDetectWithReqs() {
|
|
detect "simple-requirements"
|
|
assertCapturedEquals "Python"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testDetectWithEmptyReqs() {
|
|
detect "empty-requirements"
|
|
assertCapturedEquals "Python"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testDetectDjango14() {
|
|
detect "django-1.4-skeleton"
|
|
assertCapturedEquals "Python/Django"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testDetectDjango13() {
|
|
detect "django-1.3-skeleton"
|
|
assertCapturedEquals "Python/Django"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testDetectNotDjangoWithSettings() {
|
|
detect "not-django"
|
|
assertCapturedEquals "Python"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testDetectWithSetupPy() {
|
|
detect "distutils"
|
|
assertCapturedEquals "Python"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testDetectWithSetupRequires() {
|
|
detect "no-requirements"
|
|
assertCapturedEquals "Python"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testDetectNotPython() {
|
|
detect "not-python"
|
|
assertNotCaptured "Python"
|
|
assertEquals "1" "${RETURN}"
|
|
}
|
|
|
|
testDetectDjangoWithMultipleRequirements() {
|
|
detect "multiple-requirements"
|
|
assertCapturedEquals "Python/Django"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
|
|
## utils ########################################
|
|
|
|
pushd $(dirname 0) >/dev/null
|
|
BASE=$(pwd)
|
|
popd >/dev/null
|
|
|
|
source ${BASE}/vendor/test-utils
|
|
|
|
detect() {
|
|
capture ${BASE}/bin/detect ${BASE}/test/$1
|
|
}
|
|
|
|
compile() {
|
|
capture ${BASE}/bin/compile ${BASE}/test/$1
|
|
}
|
|
|
|
source ${BASE}/vendor/shunit2
|
|
|