def results_tc_args(self):
"""Read data from results_tc file from previous run of app.
This method is only required when not running from the with the
TcEX platform and is only intended for testing apps locally.
Returns:
(dictionary): A dictionary of values written to results_tc.
"""
results = []
if os.access(self.default_args.tc_out_path, os.W_OK):
result_file = '{}/results.tc'.format(self.default_args.tc_out_path)
else:
result_file = 'results.tc'
if os.path.isfile(result_file):
with open(result_file, 'r') as rh:
results = rh.read().strip().split('\n')
os.remove(result_file)
for line in results:
key, value = line.split(' = ')
setattr(self.default_args, key, value)
评论列表
文章目录