Skip to content
Snippets Groups Projects
Commit 9aa6ea90 authored by Malte Schokolowski's avatar Malte Schokolowski
Browse files
parents bcbe550e 0c80efc0
No related branches found
No related tags found
1 merge request!22Added abstracts to json, negative tests and bug fixes
This commit is part of merge request !22. Comments created here will be created in the context of that merge request.
......@@ -24,11 +24,6 @@ class ConstructionTest(unittest.TestCase):
self.assertCountEqual(doi_nodes, ['doiz1', 'doiz2'])
self.assertCountEqual(edges, [['doiz2', 'doiz1'], ['doiz1', 'doiz2']])
#def testBigCycle(self):
#def testEmptyHeight(self):
#def testEmptyDepth(self):
def testEmptyDepthHeight(self):
nodes, edges, err_list = init_graph_construction(['doi1'],0,0,True,False)
......@@ -85,6 +80,25 @@ class ConstructionTest(unittest.TestCase):
self.assertCountEqual(doi_nodes,['doi_d02','doi_d1','doi_d2'])
self.assertCountEqual(edges, [['doi_d02','doi_d1'], ['doi_d1','doi_d2']])
def test_incorrect_input_dois(self):
nodes, edges, err_list = init_graph_construction(['doi1ic', 'doi2ic'],1,1, True, False)
doi_nodes = keep_only_dois(nodes)
self.assertCountEqual(doi_nodes, [])
self.assertCountEqual(edges, [])
self.assertCountEqual(err_list, ['doi1ic', 'doi2ic'])
nodes, edges, err_list = init_graph_construction(['doi1ic', 'doi2ic'],2,2, True, False)
doi_nodes = keep_only_dois(nodes)
self.assertCountEqual(doi_nodes, [])
self.assertCountEqual(edges, [])
self.assertCountEqual(err_list, ['doi1ic', 'doi2ic'])
nodes, edges, err_list = init_graph_construction(['doi1', 'doi2ic'],1,1, True, False)
doi_nodes = keep_only_dois(nodes)
self.assertCountEqual(doi_nodes, ['doi1', 'doi2', 'doi3'])
self.assertCountEqual(edges, [['doi1', 'doi2'], ['doi3', 'doi1']])
self.assertCountEqual(err_list, ['doi2ic'])
## Ab hier die Tests für die einzelnen Funktionen ##
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment