mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-13 16:54:45 +03:00
Update Tests/test_image_getdominantcolors.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
37ff4b9c70
commit
c48e87155f
|
@ -2,13 +2,9 @@ from .helper import hopper
|
||||||
|
|
||||||
|
|
||||||
def test_getdominantcolors():
|
def test_getdominantcolors():
|
||||||
def getdominantcolors(mode, numcolors=None):
|
def getdominantcolors(mode):
|
||||||
im = hopper(mode)
|
im = hopper(mode)
|
||||||
|
colors = im.getdominantcolors()
|
||||||
if numcolors:
|
|
||||||
colors = im.getdominantcolors(numcolors)
|
|
||||||
else:
|
|
||||||
colors = im.getdominantcolors()
|
|
||||||
return len(colors)
|
return len(colors)
|
||||||
|
|
||||||
assert getdominantcolors("F") == 3
|
assert getdominantcolors("F") == 3
|
||||||
|
|
Loading…
Reference in New Issue
Block a user