diff options
| author | Michael Howell <michael@notriddle.com> | 2022-06-18 10:36:12 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-06-18 10:36:12 -0700 |
| commit | 29a9f36685c8da552d0d8772778ff4ec70af0032 (patch) | |
| tree | c1c2bdbd85a072cb9cc568353bcbbc8230d8012b | |
| parent | b068e6aeb75c0991927fb5751ce81e3ac2d46aec (diff) | |
| download | rust-29a9f36685c8da552d0d8772778ff4ec70af0032.tar.gz rust-29a9f36685c8da552d0d8772778ff4ec70af0032.zip | |
Fix bug when using `--bless`
| -rw-r--r-- | src/etc/htmldocck.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py index f762e389005..70b6af717cd 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 |
