arr.tobytes() always exists in Python >= 3.2

This commit is contained in:
Andrew Murray 2023-01-02 21:03:45 +11:00
parent 549560cf55
commit 6c30b2c00d

View File

@ -58,10 +58,7 @@ def test_path():
assert list(p) == [(0.0, 1.0)]
arr = array.array("f", [0, 1])
if hasattr(arr, "tobytes"):
p = ImagePath.Path(arr.tobytes())
else:
p = ImagePath.Path(arr.tostring())
p = ImagePath.Path(arr.tobytes())
assert list(p) == [(0.0, 1.0)]