summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications/lang
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/applications/lang')
-rw-r--r--test/unit/applications/lang/go.py5
-rw-r--r--test/unit/applications/lang/java.py20
2 files changed, 15 insertions, 10 deletions
diff --git a/test/unit/applications/lang/go.py b/test/unit/applications/lang/go.py
index 6be1667b..367059e6 100644
--- a/test/unit/applications/lang/go.py
+++ b/test/unit/applications/lang/go.py
@@ -40,13 +40,12 @@ class TestApplicationGo(TestApplicationProto):
print("\n$ GOPATH=" + env['GOPATH'] + " " + " ".join(args))
try:
- process = subprocess.Popen(args, env=env)
- process.communicate()
+ process = subprocess.run(args, env=env)
except KeyboardInterrupt:
raise
- except:
+ except subprocess.CalledProcessError:
return None
return process
diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py
index 53b27b07..50998978 100644
--- a/test/unit/applications/lang/java.py
+++ b/test/unit/applications/lang/java.py
@@ -64,10 +64,17 @@ class TestApplicationJava(TestApplicationProto):
javac = [
'javac',
- '-target', '8', '-source', '8', '-nowarn',
- '-encoding', 'utf-8',
- '-d', classes_path,
- '-classpath', classpath + ':' + ws_jars[0],
+ '-target',
+ '8',
+ '-source',
+ '8',
+ '-nowarn',
+ '-encoding',
+ 'utf-8',
+ '-d',
+ classes_path,
+ '-classpath',
+ classpath + ':' + ws_jars[0],
]
javac.extend(src)
@@ -75,13 +82,12 @@ class TestApplicationJava(TestApplicationProto):
print("\n$ " + " ".join(javac))
try:
- process = subprocess.Popen(javac, stderr=subprocess.STDOUT)
- process.communicate()
+ subprocess.check_output(javac, stderr=subprocess.STDOUT)
except KeyboardInterrupt:
raise
- except:
+ except subprocess.CalledProcessError:
pytest.fail('Can\'t run javac process.')
def load(self, script, **kwargs):