mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-10-07 16:08:23 +08:00
9 lines
243 B
Python
9 lines
243 B
Python
from binaryornot.check import is_binary
|
|
|
|
|
|
def test_binaryornot_handles_non_ascii_binary_file(tmp_path):
|
|
binary_file = tmp_path / 'paper.pdf'
|
|
binary_file.write_bytes(bytes([0, 159, 255]))
|
|
|
|
assert is_binary(str(binary_file)) is True
|