Skip to content

Commit

Permalink
Fix tests to work without python 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
krinart committed Jan 30, 2019
1 parent 8087f7b commit f4cb08f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/e2e/executors/java.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)

0 comments on commit f4cb08f

Please sign in to comment.