Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-find-python.js « test « node-gyp « node_modules « npm « deps - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7f5c3946794f202a4a3b4fe7ee86a5b87f06fdce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict'

var test = require('tape')
var configure = require('../lib/configure')
var execFile = require('child_process').execFile

test('find python executable', function (t) {
  t.plan(4)

  configure.test.findPython('python', function (err, found) {
    t.strictEqual(err, null)
    var proc = execFile(found, ['-V'], function (err, stdout, stderr) {
      t.strictEqual(err, null)
      t.strictEqual(stdout, '')
      t.ok(/Python 2/.test(stderr))
    })
    proc.stdout.setEncoding('utf-8')
    proc.stderr.setEncoding('utf-8')
  })
})