Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
2001092236 committed Nov 26, 2024
1 parent 846af7a commit 9f7a5d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/test_NLI_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ def test_fit(self, node_distr, edge_extr, node_extr):
"NLI_class.EdgeExtractor.extract_all_edges",
MagicMock(return_value=([])),
)
@mock.patch(
@mock.patch.object(
"NLI_class.NodeDistributer.suggest_vertex_distributions",
MagicMock(return_value=(['binary'])),
)
@mock.patch(
"NLI_class.GMG_graph",
MagicMock(return_value=('graph created')),
)
def test_construct_graph(self, gmg_gr, node_distr, edge_extr, node_extr):
def test_construct_graph(self, node_distr):

res = self.nli.construct_graph()

Expand Down
14 changes: 7 additions & 7 deletions tests/test_graph_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ class TestGraphClass(unittest.TestCase):

@classmethod
def setUpClass(self) -> None:
nodes = ["a", "b", "c"]
edges = [
self.nodes = ["a", "b", "c"]
self.edges = [
("a", "b"),
("b", "c"),
("a", "c"),
]

node_distrs = ["categorical", "binary", "continious"]
self.node_distrs = ["categorical", "binary", "continious"]

self.G = GMG_graph(nodes, edges, node_distrs)
self.G = GMG_graph(self.nodes, self.edges, self.node_distrs)

def test_init(self):
self.assertEqual(self.G.nodes, nodes)
self.assertEqual(self.G.edges, edges)
self.assertEqual(self.G.node_distrs, node_distrs)
self.assertEqual(self.G.nodes, self.nodes)
self.assertEqual(self.G.edges, self.edges)
self.assertEqual(self.G.node_distrs, self.node_distrs)

@mock.patch(
"graph_class.Ipython.display.Image",
Expand Down

0 comments on commit 9f7a5d8

Please sign in to comment.