def test_set_src_img(pil_image: Img):
    """Test that setting the src works.

    Args:
        pil_image: The image to serialize.
    """
    image = Image.create(src=pil_image)
    assert str(image.src._js_expr) == '"' + serialize_image(pil_image) + '"'  # pyright: ignore [reportAttributeAccessIssue]
Test that setting the src works.

    Args:
        pil_image: The image to serialize.
    
tests/units/components/media/test_image.py