Skip to content

Commit

Permalink
fixup! test: accept Python 3 in test-find-python.js
Browse files Browse the repository at this point in the history
  • Loading branch information
joaocgreis committed Jul 24, 2019
1 parent 9b6e9ac commit a7b1d46
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/test-find-python.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ test('find python', function (t) {
t.strictEqual(err, null)
var proc = execFile(found, ['-V'], function (err, stdout, stderr) {
t.strictEqual(err, null)
t.ok(stdout === '' || stderr === '')
t.ok(/Python 2/.test(stderr) || /Python 3/.test(stdout))
if (/Python 2/.test(stderr)) {
t.strictEqual(stdout, '')
t.ok(/Python 2/.test(stderr))
} else {
t.ok(/Python 3/.test(stdout))
t.strictEqual(stderr, '')
}
})
proc.stdout.setEncoding('utf-8')
proc.stderr.setEncoding('utf-8')
Expand Down

0 comments on commit a7b1d46

Please sign in to comment.