From 8087f7bcb0f24132f554406ec1c93fcfed25cab9 Mon Sep 17 00:00:00 2001 From: Viktor Ershov Date: Tue, 29 Jan 2019 19:45:53 -0800 Subject: [PATCH 1/2] Add more python versions to .travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index d54bc433..91cc4227 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: python python: + - "3.4" + - "3.5" - "3.6" install: From f4cb08fa19244c7cd666b18637cd4b796bbd77b1 Mon Sep 17 00:00:00 2001 From: Viktor Ershov Date: Tue, 29 Jan 2019 19:56:26 -0800 Subject: [PATCH 2/2] Fix tests to work without python 3.4 --- tests/e2e/executors/java.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/executors/java.py b/tests/e2e/executors/java.py index 44a79588..9eb62776 100644 --- a/tests/e2e/executors/java.py +++ b/tests/e2e/executors/java.py @@ -24,8 +24,8 @@ def predict(self, X): "Executor", "Model", "score" ] exec_args.extend(map(str, X)) - result = subprocess.run(exec_args, stdout=subprocess.PIPE) - items = result.stdout.decode("utf-8").split(" ") + result = subprocess.Popen(exec_args, stdout=subprocess.PIPE) + items = result.stdout.read().decode("utf-8").split(" ") if len(items) == 1: return float(items[0]) else: @@ -51,4 +51,4 @@ def prepare(self): # Compile all files together. exec_args = [self._javac_bin] + files_to_compile + ( [os.path.join(self._resource_tmp_dir, "Executor.java")]) - subprocess.run(exec_args) + subprocess.call(exec_args)