From 6c30b2c00d061f5b634f8c10337eb8a7fe29192d Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 2 Jan 2023 21:03:45 +1100 Subject: [PATCH] arr.tobytes() always exists in Python >= 3.2 --- Tests/test_imagepath.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Tests/test_imagepath.py b/Tests/test_imagepath.py index de3920cf5..861fb64f0 100644 --- a/Tests/test_imagepath.py +++ b/Tests/test_imagepath.py @@ -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)]