-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename test file and fix import statements.
- Loading branch information
1 parent
ca73b8d
commit d563990
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
10 changes: 5 additions & 5 deletions
10
tests/test_node_list-colouring.py → tests/test_node-list-colouring.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import listcolouring | ||
import listcolouring as lc | ||
import networkx as nx | ||
import vizing | ||
import vizing as vz | ||
|
||
def test_node_list_colouring_problem(): | ||
G = nx.petersen_graph() | ||
G = listcolouring.list_init_node(G, range(1, 10), 3, 0) | ||
G = vizing.node_list_colouring_problem(G) | ||
G = lc.list_init_node(G, range(1, 10), 3, 0) | ||
G = vz.node_list_colouring_problem(G) | ||
|
||
def test_node_list_colouring_solution(): | ||
G = nx.complete_graph(3) | ||
permissible_dict = {0: [0, 1], 1: [1, 2], 2: [2, 3]} | ||
nx.set_node_attributes(G, permissible_dict, "permissible") | ||
G = vizing.node_list_colouring_solution(G) | ||
G = vz.node_list_colouring_solution(G) | ||
assert G.nodes[0]['colour'] == 1 | ||
assert G.nodes[1]['colour'] == 2 | ||
assert G.nodes[2]['colour'] == 3 |