Fix bug when using --bless
This commit is contained in:
parent
b068e6aeb7
commit
29a9f36685
@ -417,7 +417,7 @@ def check_snapshot(snapshot_name, actual_tree, normalize_to_text):
|
||||
snapshot_path = '{}.{}.{}'.format(rust_test_path[:-3], snapshot_name, 'html')
|
||||
try:
|
||||
with open(snapshot_path, 'r') as snapshot_file:
|
||||
expected_str = snapshot_file.read()
|
||||
expected_str = snapshot_file.read().replace("{{channel}}", channel)
|
||||
except FileNotFoundError:
|
||||
if bless:
|
||||
expected_str = None
|
||||
@ -429,8 +429,6 @@ def check_snapshot(snapshot_name, actual_tree, normalize_to_text):
|
||||
else:
|
||||
actual_str = flatten(actual_tree)
|
||||
|
||||
expected_str = expected_str.replace("{{channel}}", channel)
|
||||
|
||||
# Conditions:
|
||||
# 1. Is --bless
|
||||
# 2. Are actual and expected tree different
|
||||
|
Loading…
x
Reference in New Issue
Block a user