def shipit(uri, schema=None): args = parse_args() with tempfile.NamedTemporaryFile() as f: write_graph( to_graph(relate(sa.create_engine(args.uri), schema=args.schema)), f.name) yield f.name
def shipit(uri, schema=None): args = parse_args() with tempfile.NamedTemporaryFile() as f: write_graph(to_graph( relate(sa.create_engine(args.uri), schema=args.schema) ), f.name) yield f.name
def test_to_graph(engine): assert to_graph(relate(engine)).edges()
def test_write_agraph(engine, tmpdir): filename = str(tmpdir.join('tmp.dot')) write_graph(to_graph(relate(engine)), filename) assert os.path.exists(filename)