Fix tests for Windows

This commit is contained in:
Peter Melnichenko 2016-04-30 11:04:10 +03:00
parent 8ea50693c3
commit 4cc9759aaf

View File

@ -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")