Skip to content

Commit b603d25

Browse files
committed
Even a bit better.
1 parent ba088d8 commit b603d25

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ def test_binary_file_duplicate_equal():
3131
)
3232

3333

34+
def test_binary_file_duplicate_equal():
35+
"""Test writing same binary data to a file multiple times"""
36+
with pytest.raises(Exception) as exc_info:
37+
expect_selfie(b"a").to_be_file(
38+
"tests/binary_test__test_binary_file_duplicate_unequal.bin"
39+
)
40+
expect_selfie(b"b").to_be_file(
41+
"tests/binary_test__test_binary_file_duplicate_unequal.bin"
42+
)
43+
expect_selfie(safify(str(exc_info.value))).to_be(
44+
"Snapshot mismatch, TODO: string comparison"
45+
)
46+
47+
3448
def test_binary_file_mismatch():
3549
"""Test error handling for mismatched binary data"""
3650
with pytest.raises(AssertionError):

0 commit comments

Comments
 (0)