diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2021-11-09 11:22:02 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2021-11-09 13:22:19 +0100 |
commit | 9dd6822f734fb5b231cc0aa81b6c4d5352e2d7df (patch) | |
tree | 255971cb7fd3971f0be34103bd99ac4ca86990d2 /xtesting/core/mts.py | |
parent | d130de7e57f8394104654da3f37afb631538aa2b (diff) |
Leverage latest pylint features
It adds encoding in all open call and leverage f-strings.
Change-Id: I70ccd2bfcadae44929d5874f98fa3bf4ff644488
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 17739d718901a10f7ec0aaf9a6d53141294a347d)
Diffstat (limited to 'xtesting/core/mts.py')
-rw-r--r-- | xtesting/core/mts.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/xtesting/core/mts.py b/xtesting/core/mts.py index 3bc7bde9..0f15733c 100644 --- a/xtesting/core/mts.py +++ b/xtesting/core/mts.py @@ -65,7 +65,7 @@ class MTSLauncher(feature.BashFeature): """Parse testPlan.csv containing the status of each testcase of the test file. See sample file in `xtesting/samples/mts/output/testPlan.csv` """ - with open(self.mts_result_csv_file) as stream_: + with open(self.mts_result_csv_file, encoding='utf-8') as stream_: self.__logger.info("Parsing file : %s", self.mts_result_csv_file) reader = csv.reader(stream_, delimiter=';') rownum = 0 @@ -183,18 +183,13 @@ class MTSLauncher(feature.BashFeature): return -3 # Build command line to launch for MTS - cmd = ("cd {} && ./startCmd.sh {} {} -sequential -levelLog:{}" - " -storageLog:{}" - " -config:stats.REPORT_DIRECTORY+{}" - " -config:logs.STORAGE_DIRECTORY+{}" + cmd = (f"cd {cwd} && ./startCmd.sh {test_file} " + f"{enabled_testcases_str} -sequential -levelLog:{log_level}" + f" -storageLog:{store_method}" + f" -config:stats.REPORT_DIRECTORY+{self.mts_stats_dir}" + f" -config:logs.STORAGE_DIRECTORY+{self.mts_logs_dir}" " -genReport:true" - " -showRep:false").format(cwd, - test_file, - enabled_testcases_str, - log_level, - store_method, - self.mts_stats_dir, - self.mts_logs_dir) + " -showRep:false") # Make sure to create the necessary output sub-folders for MTS # and cleanup output files from previous run. |