import pytest from clusterview.colors import Color from clusterview.math import Math from clusterview.points import Point def test_euclidean_distance(): p1 = Point(150, 100, Color.BLACK, 8, 800, 600) p2 = Point(300, 200, Color.BLACK, 8, 800, 600) d = Math.euclidean_distance(p1, p2) assert round(d, 2) == 180.28 def test_euclidean_distance_bad_points(): with pytest.raises(ValueError): Math.euclidean_distance(1, 1)