def test_page_rank_does_run_mwe(self): c = comptox_ai.ComptoxAI(config_file=CONFIG_FILE) # Run PageRank on entire graph with no filtering pr = PageRank() pr.run(c.graph) assert _validate_pr_result_format(pr.algorithm_results)
def load_full_graph(): if os.path.exists('CONFIG.cfg'): CONFIG_FILE = 'CONFIG.cfg' else: CONFIG_FILE = 'CONFIG-default.cfg' c = comptox_ai.ComptoxAI(config_file=CONFIG_FILE) return c.graph
def test_shortest_path_returns_path(self): c = comptox_ai.ComptoxAI(config_file=CONFIG_FILE) # Find the shortest path between "mie_increase_urinary_bladder_calculi" # and "dis_adenoma" sp = ShortestPath(mie_node="793", ao_node="Adenoma") sp.run(c.graph) assert isinstance(sp.algorithm_results, comptox_ai.graph.Path)
def test_page_rank_does_instantiate(self): try: c = comptox_ai.ComptoxAI(config_file=CONFIG_FILE) pr = PageRank() assert ((c is not None) and (pr is not None)) except: print("Uh oh") assert False
def test_does_create_bolt_driver(self): c = comptox_ai.ComptoxAI(config_file=CONFIG_FILE) assert isinstance(c.graph.driver, neo4j.DirectDriver)