Skip to content

Commit a7b1d46

Browse files
committed
fixup! test: accept Python 3 in test-find-python.js
1 parent 9b6e9ac commit a7b1d46

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/test-find-python.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ test('find python', function (t) {
1616
t.strictEqual(err, null)
1717
var proc = execFile(found, ['-V'], function (err, stdout, stderr) {
1818
t.strictEqual(err, null)
19-
t.ok(stdout === '' || stderr === '')
20-
t.ok(/Python 2/.test(stderr) || /Python 3/.test(stdout))
19+
if (/Python 2/.test(stderr)) {
20+
t.strictEqual(stdout, '')
21+
t.ok(/Python 2/.test(stderr))
22+
} else {
23+
t.ok(/Python 3/.test(stdout))
24+
t.strictEqual(stderr, '')
25+
}
2126
})
2227
proc.stdout.setEncoding('utf-8')
2328
proc.stderr.setEncoding('utf-8')

0 commit comments

Comments
 (0)