From 141e2db112fb454f2174b6a5c3b5212a3f1132ab Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Tue, 12 Aug 2014 20:15:46 -0700 Subject: Use kafka_run_class_env() to set environment vars in test fixtures --- test/service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/service.py') diff --git a/test/service.py b/test/service.py index 8872c82..2c667c7 100644 --- a/test/service.py +++ b/test/service.py @@ -26,10 +26,11 @@ class ExternalService(object): class SpawnedService(threading.Thread): - def __init__(self, args=[]): + def __init__(self, args=[], env=None): threading.Thread.__init__(self) self.args = args + self.env = env self.captured_stdout = [] self.captured_stderr = [] @@ -41,6 +42,7 @@ class SpawnedService(threading.Thread): def run_with_handles(self): self.child = subprocess.Popen( self.args, + env=self.env, bufsize=1, stdout=subprocess.PIPE, stderr=subprocess.PIPE) -- cgit v1.2.1