def _setup_working_dir(self): working_dir = Files.createTempDirectory("sfdc_tempdir") working_dir_path = str(working_dir.toAbsolutePath()) package_path = Files.createDirectory(working_dir.resolve("deploy_root")) return working_dir, working_dir_path, package_path
from com.thinkaurelius.titan.core import TitanFactory from com.thinkaurelius.titan.core import Order from com.thinkaurelius.titan.core import Multiplicity from com.thinkaurelius.titan.core.attribute import Decimal from com.thinkaurelius.titan.graphdb.types.vertices import PropertyKeyVertex from com.thinkaurelius.titan.graphdb.types import StandardPropertyKeyMaker from com.thinkaurelius.titan.graphdb.types.vertices import EdgeLabelVertex from com.thinkaurelius.titan.graphdb.types import StandardEdgeLabelMaker from com.thinkaurelius.titan.graphdb.types import VertexLabelVertex from com.thinkaurelius.titan.graphdb.types import StandardVertexLabelMaker from com.thinkaurelius.titan.core import Cardinality from java.lang import Double, String, Integer from java.nio.file import Files graph_son_filename = os.path.join(str(Files.createTempDirectory("temp_graph_son_dir")), "graph.son") graph = TinkerGraphFactory.createTinkerGraph() titan_graph = TitanFactory.build().set("storage.backend", "inmemory").open() g = Gremthon(graph) tg = Gremthon(titan_graph) def test_gremthon_repr(): """ Verify repr of a gremthon wrapped graph """ assert str(g) == "tinkergraph[vertices:6 edges:6]"
from com.thinkaurelius.titan.core import TitanFactory from com.thinkaurelius.titan.core import Order from com.thinkaurelius.titan.core import Multiplicity from com.thinkaurelius.titan.core.attribute import Decimal from com.thinkaurelius.titan.graphdb.types.vertices import PropertyKeyVertex from com.thinkaurelius.titan.graphdb.types import StandardPropertyKeyMaker from com.thinkaurelius.titan.graphdb.types.vertices import EdgeLabelVertex from com.thinkaurelius.titan.graphdb.types import StandardEdgeLabelMaker from com.thinkaurelius.titan.graphdb.types import VertexLabelVertex from com.thinkaurelius.titan.graphdb.types import StandardVertexLabelMaker from com.thinkaurelius.titan.core import Cardinality from java.lang import Double, String, Integer from java.nio.file import Files graph_son_filename = os.path.join(str(Files.createTempDirectory('temp_graph_son_dir')), 'graph.son') graph = TinkerGraphFactory.createTinkerGraph() titan_graph = TitanFactory.build().set('storage.backend','inmemory').open() g = Gremthon(graph) tg = Gremthon(titan_graph) def test_gremthon_repr(): """ Verify repr of a gremthon wrapped graph """ assert str(g) == 'tinkergraph[vertices:6 edges:6]'