Skip to content

Commit

Permalink
Fix newline in test_result.txt and markdown. (#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyang2057 authored Sep 1, 2023
1 parent 169b1ee commit 3f92e3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/compare_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def compare_ndarray(expected: np.ndarray,
if dump_hist:
y, x = np.histogram(expected - actual, 100)
np.savetxt(dump_file, np.stack((x[:-1], y)).T, fmt='%f', delimiter=',')
similarity_info = f"{similarity_name} similarity = {similarity}, threshold = {threshold}"
similarity_info = f"{similarity_name} similarity = {similarity}, threshold = {threshold}\n"

if similarity_name in ['cosine', 'euclidean', 'segment']:
compare_op = lt
Expand Down
2 changes: 1 addition & 1 deletion tests/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def run(self, model_file: Union[List[str], str]):

if stage == 'infer' and self.cfg['dump_infer']:
self.infer_dict['result'] = 'Pass' if judge else 'Fail'
self.infer_dict['remark'] = result.replace('\n', ' ')
self.infer_dict['remark'] = result.replace('\n', '<br>')
dump_dict_to_json(self.infer_dict, self.infer_file)
if not judge:
if test_utils.in_ci():
Expand Down

0 comments on commit 3f92e3e

Please sign in to comment.