diff options
author | liyin <liyin11@huawei.com> | 2016-10-25 00:39:22 -0400 |
---|---|---|
committer | liyin <liyin11@huawei.com> | 2016-10-25 02:08:32 -0400 |
commit | b60b5daa668899d528c70c1d4858421eb71e73a6 (patch) | |
tree | 9c362b4636000034d065eaf5ae8a2cb9b6628c99 /testsuites/posca/run_posca.py | |
parent | 7e8c86c25a6f2fb52f06276392dfdbb16f104928 (diff) |
Modify POSCA code into PEP8 style
JIRA: BOTTLENECK-102
Modify all the code in the testcase POSCA into PEP8 style.
Using more standard way to realize our function.
Change-Id: Ic014678db454b8a36b36395c32b4769f6cf700be
Signed-off-by: liyin <liyin11@huawei.com>
Diffstat (limited to 'testsuites/posca/run_posca.py')
-rwxr-xr-x | testsuites/posca/run_posca.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/testsuites/posca/run_posca.py b/testsuites/posca/run_posca.py index 9f90b3c7..48376b54 100755 --- a/testsuites/posca/run_posca.py +++ b/testsuites/posca/run_posca.py @@ -8,32 +8,36 @@ # http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import os
import sys
import subprocess
INTERPRETER = "/usr/bin/python"
-#------------------------------------------------------
+# ------------------------------------------------------
# run posca testcase
# ------------------------------------------------------
+
+
def posca_run(arg):
- print "========== run posca ==========="
+ print("========== run posca ==========")
if(arg == "factor_system_bandwidth"):
- print "========== run posca_system_bandwidth ==========="
- cmd = '/home/opnfv/bottlenecks/testsuites/posca/testcase_script/posca_factor_system_bandwidth.py'
- pargs = [INTERPRETER,cmd]
+ print("========== run posca_system_bandwidth ===========")
+ cmd = '/home/opnfv/bottlenecks/testsuites/posca/testcase_script/\
+ posca_factor_system_bandwidth.py'
+ pargs = [INTERPRETER, cmd]
sub_result = subprocess.Popen(pargs)
sub_result.wait()
+
def posca_env_check():
- print "========== posca env check ==========="
+ print("========== posca env check ===========")
+
def main():
- para_testname = sys.argv[0]
+ # para_testname = sys.argv[0]
para_test_arg = sys.argv[1]
posca_env_check()
posca_run(para_test_arg)
sys.exit(0)
-if __name__=='__main__':
+if __name__ == '__main__':
main()
|