Functions | Variables
test_dfp_graph Namespace Reference

Functions

def test_make ()
 

Variables

string node_desc_json
 

Function Documentation

def test_dfp_graph.test_make ( )

Definition at line 22 of file test_dfp_graph.py.

22 def test_make():
23  'Make a wirecell.dfp.graph.Graph'
24  g = graph.Graph()
25  a = graph.key("A","a")
26  b = graph.key("B","b")
27  graph.connect(g, a,b, 0,0)
28  graph.connect(g, a,b, 1,1)
29  graph.connect(g, a,b, 2,2)
30  graph.connect(g, a,b, 3,0)
31 
32  desc = nodetype.loads(node_desc_json)
33  graph.validate(g, desc)
34 
35  gvgraph = dot.gvgraph_nodetypes(g, desc)
36  print gvgraph.string()
37 
38  # dot = g.dumps_dot()
39  # print dot
40  # open('foo.dot','w').write(dot)
41 
42  # g2 = Graph()
43  # g2.loads_dot(dot)
44  # print g2.dumps_dot()
45 

Variable Documentation

string test_dfp_graph.node_desc_json
Initial value:
1 = '''
2 [
3  {
4  "category" : 1,
5  "concurrency" : 1,
6  "output_types" : [ "int", "float", "double", "int" ],
7  "type" : "A"
8  },
9  {
10  "category" : 3,
11  "concurrency" : 0,
12  "input_types" : ["int","float","double"],
13  "type" : "B"
14  }
15 ]
16 '''

Definition at line 4 of file test_dfp_graph.py.