Skip to content

Commit

Permalink
Fix bug when using --bless
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle committed Jun 18, 2022
1 parent b068e6a commit 29a9f36
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/etc/htmldocck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 29a9f36

Please sign in to comment.