diff --git a/tests/drawcustom/arc_test.py b/tests/drawcustom/arc_test.py index 21c23c2..beb052f 100644 --- a/tests/drawcustom/arc_test.py +++ b/tests/drawcustom/arc_test.py @@ -31,7 +31,7 @@ async def test_arc_basic(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(ARC_IMG_PATH, 'arc_basic.png')) + example_img = Image.open(os.path.join(ARC_IMG_PATH, 'arc_basic.jpg')) assert images_equal(generated_img, example_img), "Basic arc rendering failed" @pytest.mark.asyncio @@ -56,5 +56,5 @@ async def test_pie_slice_basic(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(ARC_IMG_PATH, 'pie_slice_basic.png')) + example_img = Image.open(os.path.join(ARC_IMG_PATH, 'pie_slice_basic.jpg')) assert images_equal(generated_img, example_img), "Basic pie slice rendering failed" \ No newline at end of file diff --git a/tests/drawcustom/circle_test.py b/tests/drawcustom/circle_test.py index ffe8154..0a13080 100644 --- a/tests/drawcustom/circle_test.py +++ b/tests/drawcustom/circle_test.py @@ -31,7 +31,7 @@ async def test_circle_filled(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_filled.png')) + example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_filled.jpg')) assert images_equal(generated_img, example_img), "Basic filled circle rendering failed" @pytest.mark.asyncio @@ -55,7 +55,7 @@ async def test_circle_outline(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_outline.png')) + example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_outline.jpg')) assert images_equal(generated_img, example_img), "Basic outline circle rendering failed" @pytest.mark.asyncio @@ -80,5 +80,5 @@ async def test_circle_percentage(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_percentage.png')) + example_img = Image.open(os.path.join(CIRCLE_IMG_PATH, 'circle_percentage.jpg')) assert images_equal(generated_img, example_img), "Basic filled circle rendering failed" diff --git a/tests/drawcustom/common_test.py b/tests/drawcustom/common_test.py index a991340..ec55a69 100644 --- a/tests/drawcustom/common_test.py +++ b/tests/drawcustom/common_test.py @@ -30,7 +30,7 @@ async def test_multiple_elements(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'multiple_elements.png')) + example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'multiple_elements.jpg')) assert images_equal(generated_img, example_img), "Multiple elements drawing failed" @pytest.mark.asyncio @@ -56,7 +56,7 @@ async def test_rotation(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'rotated.png')) + example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'rotated.jpg')) assert images_equal(generated_img, example_img), "rotated elements drawing failed" @pytest.mark.asyncio @@ -76,7 +76,7 @@ async def test_oversize_elements(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'oversize_elements.png')) + example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'oversize_elements.jpg')) assert images_equal(generated_img, example_img), "Oversize elements drawing failed" @pytest.mark.asyncio @@ -97,7 +97,7 @@ async def test_overlapping_elements(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'overlapping_elements.png')) + example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'overlapping_elements.jpg')) assert images_equal(generated_img, example_img), "Overlapping elements drawing failed" @pytest.mark.asyncio @@ -117,5 +117,5 @@ async def test_negative_coordinates(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'negative_coordinates.png')) + example_img = Image.open(os.path.join(COMMON_IMG_PATH, 'negative_coordinates.jpg')) assert images_equal(generated_img, example_img), "Negative coordinate elements drawing failed" diff --git a/tests/drawcustom/conftest.py b/tests/drawcustom/conftest.py index f53cb65..cdeacc7 100644 --- a/tests/drawcustom/conftest.py +++ b/tests/drawcustom/conftest.py @@ -167,7 +167,7 @@ def images_equal(img1, img2): def save_image(image_bytes): """Save image for debugging.""" - img_path = os.path.join(BASE_IMG_PATH, 'rename_me.png') + img_path = os.path.join(BASE_IMG_PATH, 'rename_me.jpg') with open(img_path, 'wb') as f: f.write(image_bytes) diff --git a/tests/drawcustom/debug_grid_test.py b/tests/drawcustom/debug_grid_test.py index 89d2075..dcbf9bf 100644 --- a/tests/drawcustom/debug_grid_test.py +++ b/tests/drawcustom/debug_grid_test.py @@ -26,7 +26,7 @@ async def test_debug_grid_basic(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_basic.png')) + example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_basic.jpg')) assert images_equal(generated_img, example_img), "Basic debug grid rendering failed" @pytest.mark.asyncio @@ -47,7 +47,7 @@ async def test_debug_grid_custom_spacing(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_custom_spacing.png')) + example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_custom_spacing.jpg')) assert images_equal(generated_img, example_img), "Custom spacing debug grid rendering failed" @pytest.mark.asyncio @@ -71,7 +71,7 @@ async def test_debug_grid_solid(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_solid.png')) + example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_solid.jpg')) assert images_equal(generated_img, example_img), "Solid debug grid rendering failed" @pytest.mark.asyncio @@ -91,5 +91,5 @@ async def test_debug_grid_without_labels(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_without_labels.png')) + example_img = Image.open(os.path.join(DEBUG_GRID_IMG_PATH, 'debug_grid_without_labels.jpg')) assert images_equal(generated_img, example_img), "Debug grid without labels rendering failed" \ No newline at end of file diff --git a/tests/drawcustom/ellipse_test.py b/tests/drawcustom/ellipse_test.py index 44d1e5d..beb2955 100644 --- a/tests/drawcustom/ellipse_test.py +++ b/tests/drawcustom/ellipse_test.py @@ -32,7 +32,7 @@ async def test_circle_ellipse(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(ELLIPSE_IMG_PATH, 'ellipse_drawing.png')) + example_img = Image.open(os.path.join(ELLIPSE_IMG_PATH, 'ellipse_drawing.jpg')) assert images_equal(generated_img, example_img), "Basic ellipse drawing failed" @pytest.mark.asyncio @@ -58,5 +58,5 @@ async def test_circle_ellipse_percentage(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(ELLIPSE_IMG_PATH, 'ellipse_drawing_percentage.png')) + example_img = Image.open(os.path.join(ELLIPSE_IMG_PATH, 'ellipse_drawing_percentage.jpg')) assert images_equal(generated_img, example_img), "Basic ellipse drawing failed" \ No newline at end of file diff --git a/tests/drawcustom/icon_test.py b/tests/drawcustom/icon_test.py index 69264b1..ee1edec 100644 --- a/tests/drawcustom/icon_test.py +++ b/tests/drawcustom/icon_test.py @@ -30,5 +30,5 @@ # # generated_img = Image.open(BytesIO(image_data)) # save_image(image_data) -# example_img = Image.open(os.path.join(ICON_IMG_PATH, 'icon_basic.png')) +# example_img = Image.open(os.path.join(ICON_IMG_PATH, 'icon_basic.jpg')) # assert images_equal(generated_img, example_img), "Basic icon rendering failed" \ No newline at end of file diff --git a/tests/drawcustom/line_test.py b/tests/drawcustom/line_test.py index 12943d8..02a5a82 100644 --- a/tests/drawcustom/line_test.py +++ b/tests/drawcustom/line_test.py @@ -30,7 +30,7 @@ async def test_line_basic(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(LINE_IMG_PATH, 'line_basic.png')) + example_img = Image.open(os.path.join(LINE_IMG_PATH, 'line_basic.jpg')) assert images_equal(generated_img, example_img), "Basic line rendering failed" @pytest.mark.asyncio @@ -55,7 +55,7 @@ async def test_line_custom(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(LINE_IMG_PATH, 'line_custom.png')) + example_img = Image.open(os.path.join(LINE_IMG_PATH, 'line_custom.jpg')) assert images_equal(generated_img, example_img), "Custom line rendering failed" @pytest.mark.asyncio @@ -80,7 +80,7 @@ async def test_dashed_line_basic(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_basic.png')) + example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_basic.jpg')) assert images_equal(generated_img, example_img), "Basic dashed line rendering failed" @pytest.mark.asyncio @@ -107,7 +107,7 @@ async def test_dashed_line_custom_lengths(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_custom_lengths.png')) + example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_custom_lengths.jpg')) assert images_equal(generated_img, example_img), "Custom dashed line rendering failed" @pytest.mark.asyncio @@ -131,7 +131,7 @@ async def test_dashed_line_basic_vertical(image_gen, mock_tag_info): return_value=mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_vertical.png')) + example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_vertical.jpg')) assert images_equal(generated_img, example_img), "Vertical dashed line rendering failed" @pytest.mark.asyncio @@ -158,5 +158,5 @@ async def test_dashed_line_diagonal(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_diagonal.png')) + example_img = Image.open(os.path.join(LINE_IMG_PATH, 'dashed_line_diagonal.jpg')) assert images_equal(generated_img, example_img), "Dashed line diagonal rendering failed" \ No newline at end of file diff --git a/tests/drawcustom/polygon_test.py b/tests/drawcustom/polygon_test.py index af2eec1..2d7e7f0 100644 --- a/tests/drawcustom/polygon_test.py +++ b/tests/drawcustom/polygon_test.py @@ -26,7 +26,7 @@ async def test_polygon_basic(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(POLYGON_IMG_PATH, 'polygon_basic.png')) + example_img = Image.open(os.path.join(POLYGON_IMG_PATH, 'polygon_basic.jpg')) assert images_equal(generated_img, example_img), "Basic polygon rendering failed" @pytest.mark.asyncio @@ -46,5 +46,5 @@ async def test_polygon_filled(image_gen, mock_tag_info): return_value=mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(POLYGON_IMG_PATH, 'polygon_filled.png')) + example_img = Image.open(os.path.join(POLYGON_IMG_PATH, 'polygon_filled.jpg')) assert images_equal(generated_img, example_img), "Filled polygon rendering failed" \ No newline at end of file diff --git a/tests/drawcustom/progress_bar_test.py b/tests/drawcustom/progress_bar_test.py index 5c52abf..7443875 100644 --- a/tests/drawcustom/progress_bar_test.py +++ b/tests/drawcustom/progress_bar_test.py @@ -34,7 +34,7 @@ async def test_basic_progress_bar(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar.png')) + example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar.jpg')) assert images_equal(generated_img, example_img), "Basic progress bar drawing failed" @pytest.mark.asyncio @@ -62,7 +62,7 @@ async def test_progress_bar_zero_progress(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_zero.png')) + example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_zero.jpg')) assert images_equal(generated_img, example_img), "Basic progress bar drawing failed" @pytest.mark.asyncio @@ -91,7 +91,7 @@ async def test_progress_bar_full(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_full.png')) + example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_full.jpg')) assert images_equal(generated_img, example_img), "Full progress bar drawing failed" @pytest.mark.asyncio @@ -119,7 +119,7 @@ async def test_progress_bar_negative_progress(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_zero.png')) + example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_zero.jpg')) assert images_equal(generated_img, example_img), "Progress bar with negative percentage drawing failed" @pytest.mark.asyncio @@ -148,7 +148,7 @@ async def test_progress_bar_over_full(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_full.png')) + example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_full.jpg')) assert images_equal(generated_img, example_img), "Over full progress bar drawing failed" @pytest.mark.asyncio @@ -175,5 +175,5 @@ async def test_basic_progress_bar_percentage(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_percentage.png')) + example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'progress_bar_percentage.jpg')) assert images_equal(generated_img, example_img), "Basic progress bar with percentage drawing failed" \ No newline at end of file diff --git a/tests/drawcustom/qr_code_test.py b/tests/drawcustom/qr_code_test.py index b317d89..8262b33 100644 --- a/tests/drawcustom/qr_code_test.py +++ b/tests/drawcustom/qr_code_test.py @@ -32,7 +32,7 @@ async def test_basic_qr_code(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code.png')) + example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code.jpg')) assert images_equal(generated_img, example_img), "Basic qr code drawing failed" @pytest.mark.asyncio @@ -59,7 +59,7 @@ async def test_long_qr_code(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code_long.png')) + example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code_long.jpg')) assert images_equal(generated_img, example_img), "Long qr code drawing failed" @pytest.mark.asyncio @@ -85,5 +85,5 @@ async def test_basic_qr_code_percentage(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code_percentage.png')) + example_img = Image.open(os.path.join(QR_CODE_IMG_PATH, 'qr_code_percentage.jpg')) assert images_equal(generated_img, example_img), "Basic qr code drawing with percentage failed" \ No newline at end of file diff --git a/tests/drawcustom/rectangle_pattern_test.py b/tests/drawcustom/rectangle_pattern_test.py index e066e89..b775823 100644 --- a/tests/drawcustom/rectangle_pattern_test.py +++ b/tests/drawcustom/rectangle_pattern_test.py @@ -36,7 +36,7 @@ async def test_rectangle_pattern(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_pattern.png')) + example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_pattern.jpg')) assert images_equal(generated_img, example_img), "Rectangle pattern rendering failed" @pytest.mark.asyncio @@ -68,7 +68,7 @@ async def test_rectangle_pattern_rounded_corners(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_pattern_rounded_corners.png')) + example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_pattern_rounded_corners.jpg')) assert images_equal(generated_img, example_img), "Rounded corner rectangle pattern rendering failed" @pytest.mark.asyncio @@ -98,5 +98,5 @@ async def test_rectangle_pattern(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(BASE_IMG_PATH, 'blank.png')) + example_img = Image.open(os.path.join(BASE_IMG_PATH, 'blank.jpg')) assert images_equal(generated_img, example_img), "Rounded corner rectangle pattern rendering failed" \ No newline at end of file diff --git a/tests/drawcustom/rectangle_test.py b/tests/drawcustom/rectangle_test.py index 7491f4b..00a35e3 100644 --- a/tests/drawcustom/rectangle_test.py +++ b/tests/drawcustom/rectangle_test.py @@ -32,7 +32,7 @@ async def test_rectangle_filled(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_filled.png')) + example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_filled.jpg')) assert images_equal(generated_img, example_img), "Filled rectangle rendering failed" @pytest.mark.asyncio @@ -57,7 +57,7 @@ async def test_rectangle_outline(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_outline.png')) + example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_outline.jpg')) assert images_equal(generated_img, example_img), "Outlined rectangle rendering failed" @pytest.mark.asyncio @@ -85,5 +85,5 @@ async def test_rectangle_rounded_corners(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_rounded_corners.png')) + example_img = Image.open(os.path.join(RECTANGLE_IMG_PATH, 'rectangle_rounded_corners.jpg')) assert images_equal(generated_img, example_img), "Rounded corner rectangle rendering failed" \ No newline at end of file diff --git a/tests/drawcustom/test_images/arc/arc_basic.png b/tests/drawcustom/test_images/arc/arc_basic.jpg similarity index 100% rename from tests/drawcustom/test_images/arc/arc_basic.png rename to tests/drawcustom/test_images/arc/arc_basic.jpg diff --git a/tests/drawcustom/test_images/arc/pie_slice_basic.png b/tests/drawcustom/test_images/arc/pie_slice_basic.jpg similarity index 100% rename from tests/drawcustom/test_images/arc/pie_slice_basic.png rename to tests/drawcustom/test_images/arc/pie_slice_basic.jpg diff --git a/tests/drawcustom/test_images/blank.png b/tests/drawcustom/test_images/blank.jpg similarity index 100% rename from tests/drawcustom/test_images/blank.png rename to tests/drawcustom/test_images/blank.jpg diff --git a/tests/drawcustom/test_images/circle/circle_filled.png b/tests/drawcustom/test_images/circle/circle_filled.jpg similarity index 100% rename from tests/drawcustom/test_images/circle/circle_filled.png rename to tests/drawcustom/test_images/circle/circle_filled.jpg diff --git a/tests/drawcustom/test_images/circle/circle_outline.png b/tests/drawcustom/test_images/circle/circle_outline.jpg similarity index 100% rename from tests/drawcustom/test_images/circle/circle_outline.png rename to tests/drawcustom/test_images/circle/circle_outline.jpg diff --git a/tests/drawcustom/test_images/circle/circle_percentage.png b/tests/drawcustom/test_images/circle/circle_percentage.jpg similarity index 100% rename from tests/drawcustom/test_images/circle/circle_percentage.png rename to tests/drawcustom/test_images/circle/circle_percentage.jpg diff --git a/tests/drawcustom/test_images/common/multiple_elements.png b/tests/drawcustom/test_images/common/multiple_elements.jpg similarity index 100% rename from tests/drawcustom/test_images/common/multiple_elements.png rename to tests/drawcustom/test_images/common/multiple_elements.jpg diff --git a/tests/drawcustom/test_images/common/negative_coordinates.png b/tests/drawcustom/test_images/common/negative_coordinates.jpg similarity index 100% rename from tests/drawcustom/test_images/common/negative_coordinates.png rename to tests/drawcustom/test_images/common/negative_coordinates.jpg diff --git a/tests/drawcustom/test_images/common/overlapping_elements.jpg b/tests/drawcustom/test_images/common/overlapping_elements.jpg new file mode 100644 index 0000000..a8eab05 Binary files /dev/null and b/tests/drawcustom/test_images/common/overlapping_elements.jpg differ diff --git a/tests/drawcustom/test_images/common/overlapping_elements.png b/tests/drawcustom/test_images/common/overlapping_elements.png deleted file mode 100644 index 4c213b4..0000000 Binary files a/tests/drawcustom/test_images/common/overlapping_elements.png and /dev/null differ diff --git a/tests/drawcustom/test_images/common/oversize_elements.png b/tests/drawcustom/test_images/common/oversize_elements.jpg similarity index 100% rename from tests/drawcustom/test_images/common/oversize_elements.png rename to tests/drawcustom/test_images/common/oversize_elements.jpg diff --git a/tests/drawcustom/test_images/common/rotated.png b/tests/drawcustom/test_images/common/rotated.jpg similarity index 100% rename from tests/drawcustom/test_images/common/rotated.png rename to tests/drawcustom/test_images/common/rotated.jpg diff --git a/tests/drawcustom/test_images/debug_grid/debug_grid_basic.png b/tests/drawcustom/test_images/debug_grid/debug_grid_basic.jpg similarity index 100% rename from tests/drawcustom/test_images/debug_grid/debug_grid_basic.png rename to tests/drawcustom/test_images/debug_grid/debug_grid_basic.jpg diff --git a/tests/drawcustom/test_images/debug_grid/debug_grid_custom_spacing.png b/tests/drawcustom/test_images/debug_grid/debug_grid_custom_spacing.jpg similarity index 100% rename from tests/drawcustom/test_images/debug_grid/debug_grid_custom_spacing.png rename to tests/drawcustom/test_images/debug_grid/debug_grid_custom_spacing.jpg diff --git a/tests/drawcustom/test_images/debug_grid/debug_grid_solid.png b/tests/drawcustom/test_images/debug_grid/debug_grid_solid.jpg similarity index 100% rename from tests/drawcustom/test_images/debug_grid/debug_grid_solid.png rename to tests/drawcustom/test_images/debug_grid/debug_grid_solid.jpg diff --git a/tests/drawcustom/test_images/debug_grid/debug_grid_without_labels.png b/tests/drawcustom/test_images/debug_grid/debug_grid_without_labels.jpg similarity index 100% rename from tests/drawcustom/test_images/debug_grid/debug_grid_without_labels.png rename to tests/drawcustom/test_images/debug_grid/debug_grid_without_labels.jpg diff --git a/tests/drawcustom/test_images/ellipse/ellipse_drawing.png b/tests/drawcustom/test_images/ellipse/ellipse_drawing.jpg similarity index 100% rename from tests/drawcustom/test_images/ellipse/ellipse_drawing.png rename to tests/drawcustom/test_images/ellipse/ellipse_drawing.jpg diff --git a/tests/drawcustom/test_images/ellipse/ellipse_drawing_percentage.png b/tests/drawcustom/test_images/ellipse/ellipse_drawing_percentage.jpg similarity index 100% rename from tests/drawcustom/test_images/ellipse/ellipse_drawing_percentage.png rename to tests/drawcustom/test_images/ellipse/ellipse_drawing_percentage.jpg diff --git a/tests/drawcustom/test_images/line/dashed_line_basic.png b/tests/drawcustom/test_images/line/dashed_line_basic.jpg similarity index 100% rename from tests/drawcustom/test_images/line/dashed_line_basic.png rename to tests/drawcustom/test_images/line/dashed_line_basic.jpg diff --git a/tests/drawcustom/test_images/line/dashed_line_custom_lengths.png b/tests/drawcustom/test_images/line/dashed_line_custom_lengths.jpg similarity index 100% rename from tests/drawcustom/test_images/line/dashed_line_custom_lengths.png rename to tests/drawcustom/test_images/line/dashed_line_custom_lengths.jpg diff --git a/tests/drawcustom/test_images/line/dashed_line_diagonal.png b/tests/drawcustom/test_images/line/dashed_line_diagonal.jpg similarity index 100% rename from tests/drawcustom/test_images/line/dashed_line_diagonal.png rename to tests/drawcustom/test_images/line/dashed_line_diagonal.jpg diff --git a/tests/drawcustom/test_images/line/dashed_line_vertical.png b/tests/drawcustom/test_images/line/dashed_line_vertical.jpg similarity index 100% rename from tests/drawcustom/test_images/line/dashed_line_vertical.png rename to tests/drawcustom/test_images/line/dashed_line_vertical.jpg diff --git a/tests/drawcustom/test_images/line/line_basic.png b/tests/drawcustom/test_images/line/line_basic.jpg similarity index 100% rename from tests/drawcustom/test_images/line/line_basic.png rename to tests/drawcustom/test_images/line/line_basic.jpg diff --git a/tests/drawcustom/test_images/line/line_custom.png b/tests/drawcustom/test_images/line/line_custom.jpg similarity index 100% rename from tests/drawcustom/test_images/line/line_custom.png rename to tests/drawcustom/test_images/line/line_custom.jpg diff --git a/tests/drawcustom/test_images/polygon/polygon_basic.png b/tests/drawcustom/test_images/polygon/polygon_basic.jpg similarity index 100% rename from tests/drawcustom/test_images/polygon/polygon_basic.png rename to tests/drawcustom/test_images/polygon/polygon_basic.jpg diff --git a/tests/drawcustom/test_images/polygon/polygon_filled.png b/tests/drawcustom/test_images/polygon/polygon_filled.jpg similarity index 100% rename from tests/drawcustom/test_images/polygon/polygon_filled.png rename to tests/drawcustom/test_images/polygon/polygon_filled.jpg diff --git a/tests/drawcustom/test_images/progress_bar/progress_bar.png b/tests/drawcustom/test_images/progress_bar/progress_bar.jpg similarity index 100% rename from tests/drawcustom/test_images/progress_bar/progress_bar.png rename to tests/drawcustom/test_images/progress_bar/progress_bar.jpg diff --git a/tests/drawcustom/test_images/progress_bar/progress_bar_full.png b/tests/drawcustom/test_images/progress_bar/progress_bar_full.jpg similarity index 100% rename from tests/drawcustom/test_images/progress_bar/progress_bar_full.png rename to tests/drawcustom/test_images/progress_bar/progress_bar_full.jpg diff --git a/tests/drawcustom/test_images/progress_bar/progress_bar_percentage.png b/tests/drawcustom/test_images/progress_bar/progress_bar_percentage.jpg similarity index 100% rename from tests/drawcustom/test_images/progress_bar/progress_bar_percentage.png rename to tests/drawcustom/test_images/progress_bar/progress_bar_percentage.jpg diff --git a/tests/drawcustom/test_images/progress_bar/progress_bar_zero.png b/tests/drawcustom/test_images/progress_bar/progress_bar_zero.jpg similarity index 100% rename from tests/drawcustom/test_images/progress_bar/progress_bar_zero.png rename to tests/drawcustom/test_images/progress_bar/progress_bar_zero.jpg diff --git a/tests/drawcustom/test_images/qr_code/qr_code.png b/tests/drawcustom/test_images/qr_code/qr_code.jpg similarity index 100% rename from tests/drawcustom/test_images/qr_code/qr_code.png rename to tests/drawcustom/test_images/qr_code/qr_code.jpg diff --git a/tests/drawcustom/test_images/qr_code/qr_code_long.png b/tests/drawcustom/test_images/qr_code/qr_code_long.jpg similarity index 100% rename from tests/drawcustom/test_images/qr_code/qr_code_long.png rename to tests/drawcustom/test_images/qr_code/qr_code_long.jpg diff --git a/tests/drawcustom/test_images/qr_code/qr_code_percentage.png b/tests/drawcustom/test_images/qr_code/qr_code_percentage.jpg similarity index 100% rename from tests/drawcustom/test_images/qr_code/qr_code_percentage.png rename to tests/drawcustom/test_images/qr_code/qr_code_percentage.jpg diff --git a/tests/drawcustom/test_images/rectangle/rectangle_filled.png b/tests/drawcustom/test_images/rectangle/rectangle_filled.jpg similarity index 100% rename from tests/drawcustom/test_images/rectangle/rectangle_filled.png rename to tests/drawcustom/test_images/rectangle/rectangle_filled.jpg diff --git a/tests/drawcustom/test_images/rectangle/rectangle_outline.png b/tests/drawcustom/test_images/rectangle/rectangle_outline.jpg similarity index 100% rename from tests/drawcustom/test_images/rectangle/rectangle_outline.png rename to tests/drawcustom/test_images/rectangle/rectangle_outline.jpg diff --git a/tests/drawcustom/test_images/rectangle/rectangle_rounded_corners.png b/tests/drawcustom/test_images/rectangle/rectangle_rounded_corners.jpg similarity index 100% rename from tests/drawcustom/test_images/rectangle/rectangle_rounded_corners.png rename to tests/drawcustom/test_images/rectangle/rectangle_rounded_corners.jpg diff --git a/tests/drawcustom/test_images/rectangle_pattern/rectangle_pattern.png b/tests/drawcustom/test_images/rectangle_pattern/rectangle_pattern.jpg similarity index 100% rename from tests/drawcustom/test_images/rectangle_pattern/rectangle_pattern.png rename to tests/drawcustom/test_images/rectangle_pattern/rectangle_pattern.jpg diff --git a/tests/drawcustom/test_images/rectangle_pattern/rectangle_pattern_rounded_corners.png b/tests/drawcustom/test_images/rectangle_pattern/rectangle_pattern_rounded_corners.jpg similarity index 100% rename from tests/drawcustom/test_images/rectangle_pattern/rectangle_pattern_rounded_corners.png rename to tests/drawcustom/test_images/rectangle_pattern/rectangle_pattern_rounded_corners.jpg diff --git a/tests/drawcustom/test_images/text/large_font.png b/tests/drawcustom/test_images/text/large_font.jpg similarity index 100% rename from tests/drawcustom/test_images/text/large_font.png rename to tests/drawcustom/test_images/text/large_font.jpg diff --git a/tests/drawcustom/test_images/text/small_font.png b/tests/drawcustom/test_images/text/small_font.jpg similarity index 100% rename from tests/drawcustom/test_images/text/small_font.png rename to tests/drawcustom/test_images/text/small_font.jpg diff --git a/tests/drawcustom/test_images/text/text_anchors.png b/tests/drawcustom/test_images/text/text_anchors.jpg similarity index 100% rename from tests/drawcustom/test_images/text/text_anchors.png rename to tests/drawcustom/test_images/text/text_anchors.jpg diff --git a/tests/drawcustom/test_images/text/text_basic.png b/tests/drawcustom/test_images/text/text_basic.jpg similarity index 100% rename from tests/drawcustom/test_images/text/text_basic.png rename to tests/drawcustom/test_images/text/text_basic.jpg diff --git a/tests/drawcustom/test_images/text/text_color_markup.png b/tests/drawcustom/test_images/text/text_color_markup.jpg similarity index 100% rename from tests/drawcustom/test_images/text/text_color_markup.png rename to tests/drawcustom/test_images/text/text_color_markup.jpg diff --git a/tests/drawcustom/test_images/text/text_mixed_fonts.png b/tests/drawcustom/test_images/text/text_mixed_fonts.jpg similarity index 100% rename from tests/drawcustom/test_images/text/text_mixed_fonts.png rename to tests/drawcustom/test_images/text/text_mixed_fonts.jpg diff --git a/tests/drawcustom/test_images/text/text_percentage.png b/tests/drawcustom/test_images/text/text_percentage.jpg similarity index 100% rename from tests/drawcustom/test_images/text/text_percentage.png rename to tests/drawcustom/test_images/text/text_percentage.jpg diff --git a/tests/drawcustom/test_images/text/text_special_chars.png b/tests/drawcustom/test_images/text/text_special_chars.jpg similarity index 100% rename from tests/drawcustom/test_images/text/text_special_chars.png rename to tests/drawcustom/test_images/text/text_special_chars.jpg diff --git a/tests/drawcustom/test_images/text/text_truncate.png b/tests/drawcustom/test_images/text/text_truncate.jpg similarity index 100% rename from tests/drawcustom/test_images/text/text_truncate.png rename to tests/drawcustom/test_images/text/text_truncate.jpg diff --git a/tests/drawcustom/test_images/text/text_wrapping.png b/tests/drawcustom/test_images/text/text_wrapping.jpg similarity index 100% rename from tests/drawcustom/test_images/text/text_wrapping.png rename to tests/drawcustom/test_images/text/text_wrapping.jpg diff --git a/tests/drawcustom/test_images/text/text_wrapping_anchor.png b/tests/drawcustom/test_images/text/text_wrapping_anchor.jpg similarity index 100% rename from tests/drawcustom/test_images/text/text_wrapping_anchor.png rename to tests/drawcustom/test_images/text/text_wrapping_anchor.jpg diff --git a/tests/drawcustom/test_images/text_multiline/multiline_empty_line.png b/tests/drawcustom/test_images/text_multiline/multiline_empty_line.jpg similarity index 100% rename from tests/drawcustom/test_images/text_multiline/multiline_empty_line.png rename to tests/drawcustom/test_images/text_multiline/multiline_empty_line.jpg diff --git a/tests/drawcustom/test_images/text_multiline/text_multiline.png b/tests/drawcustom/test_images/text_multiline/text_multiline.jpg similarity index 100% rename from tests/drawcustom/test_images/text_multiline/text_multiline.png rename to tests/drawcustom/test_images/text_multiline/text_multiline.jpg diff --git a/tests/drawcustom/test_images/text_multiline/text_multiline_delimiter.png b/tests/drawcustom/test_images/text_multiline/text_multiline_delimiter.jpg similarity index 100% rename from tests/drawcustom/test_images/text_multiline/text_multiline_delimiter.png rename to tests/drawcustom/test_images/text_multiline/text_multiline_delimiter.jpg diff --git a/tests/drawcustom/test_images/text_multiline/text_multiline_delimiter_and_newline.png b/tests/drawcustom/test_images/text_multiline/text_multiline_delimiter_and_newline.jpg similarity index 100% rename from tests/drawcustom/test_images/text_multiline/text_multiline_delimiter_and_newline.png rename to tests/drawcustom/test_images/text_multiline/text_multiline_delimiter_and_newline.jpg diff --git a/tests/drawcustom/text_multiline_test.py b/tests/drawcustom/text_multiline_test.py index 6ebbf8e..3b13f6b 100644 --- a/tests/drawcustom/text_multiline_test.py +++ b/tests/drawcustom/text_multiline_test.py @@ -32,7 +32,7 @@ async def test_text_multiline_basic(image_gen, mock_tag_info): generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'text_multiline.png')) + example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'text_multiline.jpg')) assert images_equal(generated_img, example_img), "Basic text rendering failed" @pytest.mark.asyncio @@ -59,7 +59,7 @@ async def test_text_multiline_delimiter(image_gen, mock_tag_info): generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'text_multiline_delimiter.png')) + example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'text_multiline_delimiter.jpg')) assert images_equal(generated_img, example_img), "Multiline text with delimiter rendering failed" @pytest.mark.asyncio @@ -85,7 +85,7 @@ async def test_text_multiline_empty_line(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'multiline_empty_line.png')) + example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'multiline_empty_line.jpg')) assert images_equal(generated_img, example_img), "Multiline text with empty line rendering failed" @pytest.mark.asyncio @@ -111,7 +111,7 @@ async def test_text_multiline_delimiter_and_newline(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'text_multiline_delimiter_and_newline.png')) + example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'text_multiline_delimiter_and_newline.jpg')) assert images_equal(generated_img, example_img), "Multiline text with delimiter and newline rendering failed" # @pytest.mark.asyncio @@ -142,7 +142,7 @@ async def test_text_multiline_delimiter_and_newline(image_gen, mock_tag_info): # # generated_img = Image.open(BytesIO(image_data)) # save_image(image_data) -# example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'calendar_format.png')) +# example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'calendar_format.jpg')) # assert images_equal(generated_img, example_img), "Calendar format multiline rendering failed" # # @pytest.mark.asyncio @@ -172,7 +172,7 @@ async def test_text_multiline_delimiter_and_newline(image_gen, mock_tag_info): # ) # # generated_img = Image.open(BytesIO(image_data)) -# example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'multiline_blank_lines.png')) +# example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'multiline_blank_lines.jpg')) # assert images_equal(generated_img, example_img), "Multiline text with blank lines rendering failed" # # @pytest.mark.asyncio @@ -202,5 +202,5 @@ async def test_text_multiline_delimiter_and_newline(image_gen, mock_tag_info): # ) # # generated_img = Image.open(BytesIO(image_data)) -# example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'multiline_whitespace.png')) +# example_img = Image.open(os.path.join(TEXT_MULTILINE_IMG_PATH, 'multiline_whitespace.jpg')) # assert images_equal(generated_img, example_img), "Multiline text whitespace handling failed" \ No newline at end of file diff --git a/tests/drawcustom/text_test.py b/tests/drawcustom/text_test.py index b278445..d64e6d6 100644 --- a/tests/drawcustom/text_test.py +++ b/tests/drawcustom/text_test.py @@ -31,7 +31,7 @@ async def test_text_basic(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_basic.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_basic.jpg')) assert images_equal(generated_img, example_img), "Basic text rendering failed" @@ -55,7 +55,7 @@ async def test_small_font_size(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'small_font.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'small_font.jpg')) assert images_equal(generated_img, example_img), "Small font size rendering failed" @@ -79,7 +79,7 @@ async def test_large_font_size(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'large_font.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'large_font.jpg')) assert images_equal(generated_img, example_img), "Large font size rendering failed" @@ -104,7 +104,7 @@ async def test_text_wrapping(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_wrapping.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_wrapping.jpg')) assert images_equal(generated_img, example_img), "Text wrapping failed" async def test_text_wrapping_with_anchor(image_gen, mock_tag_info): @@ -130,7 +130,7 @@ async def test_text_wrapping_with_anchor(image_gen, mock_tag_info): generated_img = Image.open(BytesIO(image_data)) save_image(image_data) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_wrapping_anchor.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_wrapping_anchor.jpg')) assert images_equal(generated_img, example_img), "Text wrapping failed" @@ -161,7 +161,7 @@ async def test_text_with_special_characters(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_special_chars.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_special_chars.jpg')) assert images_equal(generated_img, example_img), "Special characters rendering failed" @@ -195,7 +195,7 @@ async def test_text_color_markup(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_color_markup.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_color_markup.jpg')) assert images_equal(generated_img, example_img), "Color markup rendering failed" @pytest.mark.asyncio @@ -220,7 +220,7 @@ async def test_text_percentage(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_percentage.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_percentage.jpg')) assert images_equal(generated_img, example_img), "Text with percentage rendering failed" # @pytest.mark.asyncio @@ -266,7 +266,7 @@ async def test_text_percentage(image_gen, mock_tag_info): # # generated_img = Image.open(BytesIO(image_data)) # save_image(image_data) -# example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_alignment.png')) +# example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_alignment.jpg')) # assert images_equal(generated_img, example_img), "Text alignment failed" @pytest.mark.asyncio @@ -311,7 +311,7 @@ async def test_text_anchors(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_anchors.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_anchors.jpg')) assert images_equal(generated_img, example_img), "Text anchor points failed" @pytest.mark.asyncio @@ -346,7 +346,7 @@ async def test_text_mixed_fonts(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_mixed_fonts.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_mixed_fonts.jpg')) assert images_equal(generated_img, example_img), "Mixed fonts rendering failed" @pytest.mark.asyncio @@ -370,7 +370,7 @@ async def test_text_empty_string(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(BASE_IMG_PATH, 'blank.png')) + example_img = Image.open(os.path.join(BASE_IMG_PATH, 'blank.jpg')) assert images_equal(generated_img, example_img), "Empty text handling failed" async def test_text_truncate(image_gen, mock_tag_info): @@ -395,7 +395,7 @@ async def test_text_truncate(image_gen, mock_tag_info): image_data = await generate_test_image(image_gen, service_data) generated_img = Image.open(BytesIO(image_data)) - example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_truncate.png')) + example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_truncate.jpg')) assert images_equal(generated_img, example_img), "Text truncation failed" # @pytest.mark.asyncio @@ -445,5 +445,5 @@ async def test_text_truncate(image_gen, mock_tag_info): # ) # # generated_img = Image.open(BytesIO(image_data)) -# example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_basic.png')) +# example_img = Image.open(os.path.join(TEXT_IMG_PATH, 'text_basic.jpg')) # assert images_equal(generated_img, example_img), "Basic text rendering failed" \ No newline at end of file