From 90858317e8a983117974265694bfbdedd8f3ec66 Mon Sep 17 00:00:00 2001 From: cb <12734117+cbhyphen@users.noreply.github.com> Date: Tue, 24 Jan 2023 20:22:55 -0800 Subject: [PATCH] update max k color test test currently has the same number of adjacent nodes of same color as different color --- tests/test_fitness.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_fitness.py b/tests/test_fitness.py index 27146a34..a0aa058e 100644 --- a/tests/test_fitness.py +++ b/tests/test_fitness.py @@ -191,10 +191,10 @@ def test_queens(): @staticmethod def test_max_k_color(): """Test MaxKColor fitness function""" - edges = [(0, 1), (0, 2), (0, 4), (1, 3), (2, 0), (2, 3), (3, 4)] + edges = [(0, 1), (0, 2), (0, 4), (1, 3), (2, 0), (2, 3), (3, 4), (0, 5)] - state = np.array([0, 1, 0, 1, 1]) - assert MaxKColor(edges).evaluate(state) == 3 + state = np.array([0, 1, 0, 1, 1, 1]) + assert MaxKColor(edges).evaluate(state) == 4 @staticmethod def test_custom_fitness():