Skip to content

Commit bea0784

Browse files
technigegjmwoods
authored andcommitted
Shell setting depends on platform
1 parent dc9c133 commit bea0784

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/stub/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import os
2424
import time
2525

26+
from platform import system
2627
from threading import Thread
2728
from time import sleep
2829

@@ -43,7 +44,8 @@ def __init__(self, port, script):
4344
self.script = os.path.join(os.path.dirname(__file__), "scripts", script)
4445

4546
def run(self):
46-
self._process = subprocess.Popen(["python", "-m", "boltkit", "stub", "-v", "-l", ":{}".format(str(self.port)), "-t", "10", self.script], stdout=subprocess.PIPE)
47+
shell = system() == "Windows" # I hate myself for doing this
48+
self._process = subprocess.Popen(["python", "-m", "boltkit", "stub", "-v", "-l", ":{}".format(str(self.port)), "-t", "10", self.script], stdout=subprocess.PIPE, shell=shell)
4749
# Need verbose for this to work
4850
line = self._process.stdout.readline().decode("utf-8")
4951
log.debug("started stub server {}".format(self.port))

0 commit comments

Comments
 (0)