Skip to content

Commit 47040c7

Browse files
committed
Test positive and zero kmeans
1 parent 171e497 commit 47040c7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Tests/test_image_quantize.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ def test_quantize_dither_diff() -> None:
9999
)
100100
def test_quantize_kmeans(method) -> None:
101101
im = hopper()
102+
no_kmeans = im.quantize(kmeans=0, method=method)
103+
kmeans = im.quantize(kmeans=1, method=method)
104+
assert kmeans.tobytes() != no_kmeans.tobytes()
105+
102106
with pytest.raises(ValueError):
103107
im.quantize(kmeans=-1, method=method)
104108

0 commit comments

Comments
 (0)