mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
python: more informative error
PR-URL: https://github.com/nodejs/node-gyp/pull/1269 Refs: https://github.com/nodejs/node-gyp/pull/1582 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: João Reis <reis@janeasystems.com>
This commit is contained in:
parent
d3b21220a0
commit
49ab79d221
5 changed files with 44 additions and 23 deletions
|
@ -74,7 +74,7 @@ test('find python - python', function (t) {
|
|||
})
|
||||
|
||||
test('find python - python too old', function (t) {
|
||||
t.plan(4)
|
||||
t.plan(5)
|
||||
|
||||
var f = new TestPythonFinder('python', done)
|
||||
f.which = function(program, cb) {
|
||||
|
@ -89,12 +89,13 @@ test('find python - python too old', function (t) {
|
|||
f.checkPython()
|
||||
|
||||
function done(err) {
|
||||
t.ok(/is not supported by gyp/.test(err))
|
||||
t.ok(/this version is not supported by GYP/.test(err))
|
||||
t.ok(/For more information consult the documentation/.test(err))
|
||||
}
|
||||
})
|
||||
|
||||
test('find python - python too new', function (t) {
|
||||
t.plan(4)
|
||||
t.plan(5)
|
||||
|
||||
var f = new TestPythonFinder('python', done)
|
||||
f.which = function(program, cb) {
|
||||
|
@ -109,7 +110,8 @@ test('find python - python too new', function (t) {
|
|||
f.checkPython()
|
||||
|
||||
function done(err) {
|
||||
t.ok(/is not supported by gyp/.test(err))
|
||||
t.ok(/this version is not supported by GYP/.test(err))
|
||||
t.ok(/For more information consult the documentation/.test(err))
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -124,7 +126,7 @@ test('find python - no python', function (t) {
|
|||
f.checkPython()
|
||||
|
||||
function done(err) {
|
||||
t.ok(/Can't find Python executable/.test(err))
|
||||
t.ok(/For more information consult the documentation/.test(err))
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -171,7 +173,7 @@ test('find python - no python2, no python, unix', function (t) {
|
|||
f.checkPython()
|
||||
|
||||
function done(err) {
|
||||
t.ok(/Can't find Python executable/.test(err))
|
||||
t.ok(/For more information consult the documentation/.test(err))
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -242,7 +244,7 @@ test('find python - python 3, use python launcher', function (t) {
|
|||
|
||||
test('find python - python 3, use python launcher, python 2 too old',
|
||||
function (t) {
|
||||
t.plan(9)
|
||||
t.plan(10)
|
||||
|
||||
var f = new TestPythonFinder('python', done)
|
||||
f.checkedPythonLauncher = false
|
||||
|
@ -272,7 +274,8 @@ test('find python - python 3, use python launcher, python 2 too old',
|
|||
f.checkPython()
|
||||
|
||||
function done(err) {
|
||||
t.ok(/is not supported by gyp/.test(err))
|
||||
t.ok(/this version is not supported by GYP/.test(err))
|
||||
t.ok(/For more information consult the documentation/.test(err))
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -334,6 +337,6 @@ test('find python - no python, no python launcher, bad guess', function (t) {
|
|||
f.checkPython()
|
||||
|
||||
function done(err) {
|
||||
t.ok(/Can't find Python executable/.test(err))
|
||||
t.ok(/For more information consult the documentation/.test(err))
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue