Skip to content
Snippets Groups Projects
Commit 0c80efc0 authored by Molkentin, Alina's avatar Molkentin, Alina
Browse files

negative Tets hinzugefügt

parent e8797743
No related branches found
No related tags found
1 merge request!22Added abstracts to json, negative tests and bug fixes
......@@ -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.
Finish editing this message first!
Please register or to comment