forked from cloudfoundry/python-buildpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest
More file actions
executable file
·106 lines (85 loc) · 2 KB
/
test
File metadata and controls
executable file
·106 lines (85 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/env bash
#
# Create a Heroku app with the following buildpack:
# https://github.com/ddollar/buildpack-test
#
# 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
}
testDetectDjango16() {
detect "django-1.6-skeleton"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectDjango15() {
detect "django-1.5-skeleton"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectDjango14() {
detect "django-1.4-skeleton"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectDjango13() {
detect "django-1.3-skeleton"
assertCapturedEquals "Python"
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}"
}
testDetectSimpleRuntimePypy2() {
detect "simple-runtime-pypy2"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectSimpleRuntimePython2() {
detect "simple-runtime-python2"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectSimpleRuntimePython3() {
detect "simple-runtime" # should probably be renamed simple-runtime-python3
assertCapturedEquals "Python"
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