From 3c48f7072cd06f8f6ef6b72c7e78a38c3a747ca9 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Mon, 15 Feb 2021 15:36:14 -0500 Subject: [PATCH] test: reject Python 2 in test-find-python --- test/test-find-python.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/test-find-python.js b/test/test-find-python.js index e2d39c67cd..18a364fdfb 100644 --- a/test/test-find-python.js +++ b/test/test-find-python.js @@ -10,19 +10,15 @@ const PythonFinder = findPython.test.PythonFinder require('npmlog').level = 'warn' test('find python', function (t) { - t.plan(4) + t.plan(5) findPython.test.findPython(null, function (err, found) { t.strictEqual(err, null) var proc = execFile(found, ['-V'], function (err, stdout, stderr) { t.strictEqual(err, null) - if (/Python 2/.test(stderr)) { - t.strictEqual(stdout, '') - t.ok(/Python 2/.test(stderr)) - } else { - t.ok(/Python 3/.test(stdout)) - t.strictEqual(stderr, '') - } + t.notOk(/Python 2/.test(stderr)) + t.ok(/Python 3/.test(stdout)) + t.strictEqual(stderr, '') }) proc.stdout.setEncoding('utf-8') proc.stderr.setEncoding('utf-8')