Update Tests/test_image_getdominantcolors.py

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Ronald Lencevičius 2020-08-19 08:28:52 -07:00 committed by GitHub
parent 37ff4b9c70
commit c48e87155f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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