def setUpClass(cls): base.initialize_graph({ 'mode': 'local', 'data_path': '/tmp/euler', 'sampler_type': 'all', 'data_type': 'all' })
def setUpClass(cls): """Build Graph data for test""" base.initialize_graph({ 'mode': 'local', 'data_path': '/tmp/euler', 'sampler_type': 'all', 'data_type': 'all' })
def testInitializeGraph(self): self.assertTrue( base.initialize_graph({ 'mode': 'local', 'data_path': '/tmp/euler', 'sampler_type': u'all' }))
def testInitializeGraph(self): self.assertTrue( base.initialize_graph({ 'mode': 'Local', 'directory': os.path.join(BaseTest._cur_dir, 'testdata'), 'load_type': 'compact' }))
def setUpClass(cls): """Build Graph data for test""" cur_dir = os.path.dirname(os.path.realpath(__file__)) meta_file = os.path.join(cur_dir, 'testdata/meta.json') graph_file = os.path.join(cur_dir, 'testdata/graph.json') output_file = os.path.join(cur_dir, 'testdata/graph.dat') builder = os.path.join(cur_dir, '../../../tools/bin/json2dat.py') command = "python {builder} -i {input} -c {meta} -o {output}".format( builder=builder, input=graph_file, meta=meta_file, output=output_file) try: subprocess.call(command, shell=True) except: raise RuntimeError("Build Graph for test failed") base.initialize_graph({ 'mode': 'Local', 'directory': os.path.join(cur_dir, 'testdata'), 'load_type': 'compact' })