summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-09-16 15:37:32 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-09-16 15:37:32 +0300
commit13ecbe333a6ce7fda1f25d09412998175b435a1d (patch)
tree227e79b55bb715089f5c8461be740c8314ba9e09 /test
parenta5b9c9241ef4145b744a107ff61e33ac35262ca9 (diff)
downloadunit-13ecbe333a6ce7fda1f25d09412998175b435a1d.tar.gz
unit-13ecbe333a6ce7fda1f25d09412998175b435a1d.tar.bz2
Tests: style and minor fixes in java.py.
Diffstat (limited to 'test')
-rw-r--r--test/unit/applications/lang/java.py14
-rw-r--r--test/unit/applications/lang/node.py1
2 files changed, 7 insertions, 8 deletions
diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py
index 3010a232..40bf3662 100644
--- a/test/unit/applications/lang/java.py
+++ b/test/unit/applications/lang/java.py
@@ -7,11 +7,9 @@ from unit.applications.proto import TestApplicationProto
class TestApplicationJava(TestApplicationProto):
def load(self, script, name='app'):
-
app_path = self.testdir + '/java'
web_inf_path = app_path + '/WEB-INF/'
classes_path = web_inf_path + 'classes/'
-
script_path = self.current_dir + '/java/' + script + '/'
if not os.path.isdir(app_path):
@@ -20,27 +18,29 @@ class TestApplicationJava(TestApplicationProto):
src = []
for f in os.listdir(script_path):
+ file_path = script_path + f
+
if f.endswith('.java'):
- src.append(script_path + f)
+ src.append(file_path)
continue
if f.startswith('.') or f == 'Makefile':
continue
- if os.path.isdir(script_path + f):
+ if os.path.isdir(file_path):
if f == 'WEB-INF':
continue
- shutil.copytree(script_path + f, app_path + '/' + f)
+ shutil.copytree(file_path, app_path + '/' + f)
continue
if f == 'web.xml':
if not os.path.isdir(web_inf_path):
os.makedirs(web_inf_path)
- shutil.copy2(script_path + f, web_inf_path)
+ shutil.copy2(file_path, web_inf_path)
else:
- shutil.copy2(script_path + f, app_path)
+ shutil.copy2(file_path, app_path)
if src:
if not os.path.isdir(classes_path):
diff --git a/test/unit/applications/lang/node.py b/test/unit/applications/lang/node.py
index 931c6596..1be16458 100644
--- a/test/unit/applications/lang/node.py
+++ b/test/unit/applications/lang/node.py
@@ -5,7 +5,6 @@ from unit.applications.proto import TestApplicationProto
class TestApplicationNode(TestApplicationProto):
def load(self, script, name='app.js'):
-
# copy application
shutil.copytree(