mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +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:
|
def test_quantize_kmeans(method) -> None:
|
||||||
im = hopper()
|
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):
|
with pytest.raises(ValueError):
|
||||||
im.quantize(kmeans=-1, method=method)
|
im.quantize(kmeans=-1, method=method)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user