Skip to content

Commit 6c5178f

Browse files
committed
Fixed the weird thing that was nuking our tests.
1 parent b697dce commit 6c5178f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

python/example-pytest-selfie/tests/binary_test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ def test_base64_mismatch():
5151
with pytest.raises(Exception) as exc_info:
5252
expect_selfie(b"test data").to_be_base64("AAAA")
5353
expect_selfie(
54-
str(exc_info.value)
54+
safify(str(exc_info.value))
5555
).to_be("""Snapshot mismatch, TODO: string comparison
5656
- update this snapshot by adding `_TODO` to the function name
57-
- update all snapshots in this file by adding `#selfieonce` or `#SELFIEWRITE`""")
57+
- update all snapshots in this file by adding `#safewordonce` or `#safewordWRITE`""")
58+
59+
def safify(string: str) -> str:
60+
return string.replace("selfie", "safeword").replace("SELFIE", "safeword")
61+

0 commit comments

Comments
 (0)