Skip to content

Commit 6e24499

Browse files
committed
test_optimiser: Remove unused global axis
Failing flake8 test due to unused global variable.
1 parent ba5288c commit 6e24499

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

freegs/test_optimiser.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def test_quadratic():
4848

4949
# Answer should be close to (1,2)
5050
expected_point = np.array((1, 2))
51-
start_distance = np.sqrt(np.sum((expected_point - start_values)**2))
52-
result_distance = np.sqrt(np.sum((expected_point - result)**2))
51+
start_distance = np.sqrt(np.sum((expected_point - start_values) ** 2))
52+
result_distance = np.sqrt(np.sum((expected_point - result) ** 2))
5353
# It should always get _closer_, even if it doesn't get particularly close
5454
assert result_distance < start_distance
5555
assert np.isclose(result_distance, 0, atol=1e-1)
@@ -130,7 +130,6 @@ def test_pick_excludes():
130130
def monitor(generation, best, pop):
131131
global best_point
132132
global pop_points
133-
global axis
134133

135134
# Change the color of the previous points
136135
# to grey and light red

0 commit comments

Comments
 (0)