Skip to content

Commit 29a9f36

Browse files
committed
Fix bug when using --bless
1 parent b068e6a commit 29a9f36

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: src/etc/htmldocck.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def check_snapshot(snapshot_name, actual_tree, normalize_to_text):
417417
snapshot_path = '{}.{}.{}'.format(rust_test_path[:-3], snapshot_name, 'html')
418418
try:
419419
with open(snapshot_path, 'r') as snapshot_file:
420-
expected_str = snapshot_file.read()
420+
expected_str = snapshot_file.read().replace("{{channel}}", channel)
421421
except FileNotFoundError:
422422
if bless:
423423
expected_str = None
@@ -429,8 +429,6 @@ def check_snapshot(snapshot_name, actual_tree, normalize_to_text):
429429
else:
430430
actual_str = flatten(actual_tree)
431431

432-
expected_str = expected_str.replace("{{channel}}", channel)
433-
434432
# Conditions:
435433
# 1. Is --bless
436434
# 2. Are actual and expected tree different

0 commit comments

Comments
 (0)