mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Test positive and zero kmeans
This commit is contained in:
parent
171e497e05
commit
47040c7b35
|
@ -99,6 +99,10 @@ def test_quantize_dither_diff() -> None:
|
|||
)
|
||||
def test_quantize_kmeans(method) -> None:
|
||||
im = hopper()
|
||||
no_kmeans = im.quantize(kmeans=0, method=method)
|
||||
kmeans = im.quantize(kmeans=1, method=method)
|
||||
assert kmeans.tobytes() != no_kmeans.tobytes()
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
im.quantize(kmeans=-1, method=method)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user