MCPcopy Index your code
hub / github.com/WhyNotHugo/python-barcode / test_saving_rgba_image

Function test_saving_rgba_image

tests/test_writers.py:24–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 EAN13("100000011111", writer=ImageWriter()).write(f)
23
24 def test_saving_rgba_image() -> None:
25 assert ImageWriter is not None # workaround for mypy
26
27 rv = BytesIO()
28 EAN13(str(100000902922), writer=ImageWriter()).write(rv)
29
30 with open(f"{TESTPATH}/ean13-with-transparent-bg.png", "wb") as f:
31 writer = ImageWriter(mode="RGBA")
32
33 EAN13("100000011111", writer=writer).write(
34 f, options={"background": "rgba(255,0,0,0)"}
35 )
36
37
38def test_saving_svg_to_byteio() -> None:

Callers

nothing calls this directly

Calls 2

ImageWriterClass · 0.90
writeMethod · 0.45

Tested by

no test coverage detected