Skip to content

Commit

Permalink
the 'item' parameter in the loop was not used in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
jborbely committed May 31, 2020
1 parent 93ef539 commit 412a28a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ def test_rescale_icon():
assert isinstance(convert.rescale_icon(icon.pixmap(size), 1.0), QtGui.QPixmap)
assert isinstance(convert.rescale_icon(icon.pixmap(size).toImage(), 1.0), QtGui.QPixmap)

if sys.platform == 'win32':
if sys.platform == 'win32' and has_pythonnet():
with pytest.raises(TypeError) as err:
convert.rescale_icon('explorer|0', None)
assert str(err.value).startswith('Unsupported "size"')

# if a list/tuple then must contain 2 elements
for item in [(), [], (256,), [256,], (256, 256, 256), [256, 256, 256]]:
with pytest.raises(ValueError) as err:
convert.rescale_icon(icon, (1,))
convert.rescale_icon(icon, item)
assert str(err.value) == 'The size must be in the form (width, height)'


Expand Down

0 comments on commit 412a28a

Please sign in to comment.