diff options
author | 2021-11-09 11:22:02 +0100 | |
---|---|---|
committer | 2021-11-09 13:21:47 +0100 | |
commit | 17739d718901a10f7ec0aaf9a6d53141294a347d (patch) | |
tree | a98e6d09a42016ceec90713adac681918a4a9c62 /xtesting/core/mts.py | |
parent | 92681911699428a87ea56c0263832b96a93da3da (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>
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. |