MCPcopy Create free account
hub / github.com/Mercury7353/PyBench / test_task_88

Function test_task_88

data/unit_test/tests.py:935–945  ·  view source on GitHub ↗
(trajectory)

Source from the content-addressed store, hash-verified

933
934
935def test_task_88(trajectory):
936 image_path = "./output/88.png"
937 ref_path = "./data/88.jpeg"
938 image = Image.open(image_path)
939 gray_image = image.convert('L')
940 gray_array = np.array(gray_image)
941 black_threshold = 50
942 black_pixels = np.sum(gray_array <= black_threshold)
943 total_pixels = gray_array.size
944 black_ratio = black_pixels / total_pixels
945 assert black_ratio > 0.25, "The black pixel percentage does not exceed 30%."
946
947def test_task_89(trajectory):
948 image_path = "./output/89.png"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected