import repository from arizona
[raven.git] / apps / digdug / test_transition_sort.py
1 import transition
2
3 dict={}
4
5 #dict["*"] = ["one"]
6 #dict["one"] = ["two"]
7 #dict["two"] = ["three", "four", "five"]
8 #dict["four"] = ["seven"]
9 #dict["five"] = ["eight"]
10 #dict["seven"] = ["five"]
11 #dict["nine"] = ["ten"]
12 #dict["ten"] = ["eleven"]
13
14 dict["*"] = ["one"]
15 dict["one"] = ["two","-one"]
16 dict["three"] = ["four","-three"]
17 dict["two"] = ["three","-two"]
18
19 print "before"
20
21 l = []
22 for key in dict:
23    print key, "-->", dict[key]
24
25 print 
26 print "after"
27 for item in transition.sort_transitions(dict):
28     print item[0], "-->", item[1]