mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-10 15:24: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 getdominantcolors(mode, numcolors=None):
|
||||
def getdominantcolors(mode):
|
||||
im = hopper(mode)
|
||||
|
||||
if numcolors:
|
||||
colors = im.getdominantcolors(numcolors)
|
||||
else:
|
||||
colors = im.getdominantcolors()
|
||||
colors = im.getdominantcolors()
|
||||
return len(colors)
|
||||
|
||||
assert getdominantcolors("F") == 3
|
||||
|
|
Loading…
Reference in New Issue
Block a user