From 4cc9759aafea1e95f10648b7d97f4bf85e80201a Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Sat, 30 Apr 2016 11:04:10 +0300 Subject: [PATCH] Fix tests for Windows --- test/cli_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/cli_test.py b/test/cli_test.py index eb56884..c127efb 100644 --- a/test/cli_test.py +++ b/test/cli_test.py @@ -17,6 +17,9 @@ class TestCLI(unittest.TestCase): if from_prefix: args[0] = os.path.join("test", "here", "bin", args[0]) + if os.name == "nt" and not os.path.exists(args[0]) and not os.path.exists(args[0] + ".exe"): + args[0] += ".bat" + process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = process.communicate()[0].decode("UTF-8")