Skip to content

Commit f997fce

Browse files
committed
Fix embedded image tests to use H error correction
1 parent 453c118 commit f997fce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qrcode/tests/test_qrcode.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,15 @@ def test_render_styled_Image(self):
206206
@unittest.skipIf(not pil_Image, "Requires PIL")
207207
def test_render_styled_with_embeded_image(self):
208208
embeded_img = pil_Image.new("RGB", (10, 10), color="red")
209-
qr = qrcode.QRCode(error_correction=qrcode.ERROR_CORRECT_L)
209+
qr = qrcode.QRCode(error_correction=qrcode.ERROR_CORRECT_H)
210210
qr.add_data(UNICODE_TEXT)
211211
img = qr.make_image(image_factory=StyledPilImage, embeded_image=embeded_img)
212212
img.save(io.BytesIO())
213213

214214
@unittest.skipIf(not pil_Image, "Requires PIL")
215215
def test_render_styled_with_embeded_image_and_ratio(self):
216216
embeded_img = pil_Image.new("RGB", (10, 10), color="red")
217-
qr = qrcode.QRCode(error_correction=qrcode.ERROR_CORRECT_L)
217+
qr = qrcode.QRCode(error_correction=qrcode.ERROR_CORRECT_H)
218218
qr.add_data(UNICODE_TEXT)
219219
img = qr.make_image(image_factory=StyledPilImage, embeded_image=embeded_img, embeded_image_ratio=0.3)
220220
img.save(io.BytesIO())
@@ -224,7 +224,7 @@ def test_render_styled_with_embeded_image_path(self):
224224
tmpfile = os.path.join(self.tmpdir, "test.png")
225225
embeded_img = pil_Image.new("RGB", (10, 10), color="red")
226226
embeded_img.save(tmpfile)
227-
qr = qrcode.QRCode(error_correction=qrcode.ERROR_CORRECT_L)
227+
qr = qrcode.QRCode(error_correction=qrcode.ERROR_CORRECT_H)
228228
qr.add_data(UNICODE_TEXT)
229229
img = qr.make_image(image_factory=StyledPilImage, embeded_image_path=tmpfile)
230230
img.save(io.BytesIO())

0 commit comments

Comments
 (0)