Skip to content

Commit

Permalink
Suppress a pymaging deprecation warning in python 3 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SmileyChris committed Apr 13, 2015
1 parent c2e888d commit 9cc8a3b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qrcode/tests/test_qrcode.py
@@ -1,3 +1,4 @@
import warnings
import six
import qrcode
import qrcode.util
Expand Down Expand Up @@ -127,7 +128,10 @@ def test_render_pymaging_png(self):
qr = qrcode.QRCode()
qr.add_data(UNICODE_TEXT)
img = qr.make_image(image_factory=qrcode.image.pure.PymagingImage)
img.save(six.BytesIO())
with warnings.catch_warnings():
if six.PY3:
warnings.simplefilter('ignore', DeprecationWarning)
img.save(six.BytesIO())

@unittest.skipIf(not pymaging_png, "Requires pymaging")
def test_render_pymaging_png_bad_kind(self):
Expand Down

0 comments on commit 9cc8a3b

Please sign in to comment.