From 29a9f36685c8da552d0d8772778ff4ec70af0032 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Sat, 18 Jun 2022 10:36:12 -0700 Subject: [PATCH] Fix bug when using `--bless` --- src/etc/htmldocck.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py index f762e3890055..70b6af717cd3 100644 --- a/src/etc/htmldocck.py +++ b/src/etc/htmldocck.py @@ -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