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

Function test_saving_image_to_byteio

tests/test_writers.py:15–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13if ImageWriter is not None:
14
15 def test_saving_image_to_byteio() -> None:
16 assert ImageWriter is not None # workaround for mypy
17
18 rv = BytesIO()
19 EAN13(str(100000902922), writer=ImageWriter()).write(rv)
20
21 with open(f"{TESTPATH}/somefile.jpeg", "wb") as f:
22 EAN13("100000011111", writer=ImageWriter()).write(f)
23
24 def test_saving_rgba_image() -> None:
25 assert ImageWriter is not None # workaround for mypy

Callers

nothing calls this directly

Calls 2

ImageWriterClass · 0.90
writeMethod · 0.45

Tested by

no test coverage detected