Skip to content
Snippets Groups Projects
Commit 0d9acf30 authored by Sven Marcus's avatar Sven Marcus
Browse files

Adds test description, some formatting

parent e9af5db8
No related branches found
No related tags found
No related merge requests found
......@@ -7,9 +7,8 @@ def l2_norm(real_values, numerical_values):
raise ValueError("Real and numerical value lists must be same length")
combined_values = zip(real_values, numerical_values)
return math.sqrt(
1 / num_values
* sum(
(real_value - numerical_value) ** 2
for real_value, numerical_value in combined_values
))
sum_of_squared_distances = sum((real_value - numerical_value) ** 2
for real_value, numerical_value
in combined_values)
return math.sqrt(1 / num_values * sum_of_squared_distances)
......@@ -30,6 +30,9 @@ class TestGeometry(unittest.TestCase):
self.assertEqual(sut.x3, 3)
def test_when_setting_line_points__line_should_have_points(self):
"""
WHEN setting line points THEN line should have points
"""
sut = GbLine3D()
point1 = GbPoint3D()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment