mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-25 01:04:03 +08:00
fixed file reading name for test_tabu_search.py
This commit is contained in:
@ -2,7 +2,7 @@ import unittest
|
||||
import os
|
||||
from tabu_search import generate_neighbours, generate_first_solution, find_neighborhood, tabu_search
|
||||
|
||||
TEST_FILE = os.path.join(os.path.dirname(__file__), './tabuTestData.txt')
|
||||
TEST_FILE = os.path.join(os.path.dirname(__file__), './tabu_test_data.txt')
|
||||
|
||||
NEIGHBOURS_DICT = {'a': [['b', '20'], ['c', '18'], ['d', '22'], ['e', '26']],
|
||||
'c': [['a', '18'], ['b', '10'], ['d', '23'], ['e', '24']],
|
||||
@ -43,4 +43,4 @@ class TestClass(unittest.TestCase):
|
||||
best_sol, best_cost = tabu_search(FIRST_SOLUTION, DISTANCE, NEIGHBOURS_DICT, 4, 3)
|
||||
|
||||
self.assertEquals(['a', 'd', 'b', 'e', 'c', 'a'], best_sol)
|
||||
self.assertEquals(87, best_cost)
|
||||
self.assertEquals(87, best_cost)
|
||||
|
Reference in New Issue
Block a user