about summary refs log tree commit diff stats
path: root/test/core/graph.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/graph.py')
-rw-r--r--test/core/graph.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/core/graph.py b/test/core/graph.py
index b71c3d51..3db5e523 100644
--- a/test/core/graph.py
+++ b/test/core/graph.py
@@ -1,4 +1,5 @@
-from miasm2.core.graph import *
+from __future__ import print_function
+from miasm.core.graph import *
 
 g = DiGraph()
 g.add_node('a')
@@ -9,13 +10,13 @@ g.add_edge('a', 'c')
 g.add_edge('a', 'c')
 g.add_edge('c', 'c')
 
-print g
+print(g)
 
-print [x for x in g.successors('a')]
-print [x for x in g.predecessors('a')]
-print [x for x in g.predecessors('b')]
-print [x for x in g.predecessors('c')]
-print [x for x in g.successors('c')]
+print([x for x in g.successors('a')])
+print([x for x in g.predecessors('a')])
+print([x for x in g.predecessors('b')])
+print([x for x in g.predecessors('c')])
+print([x for x in g.successors('c')])
 
 
 """
@@ -226,7 +227,7 @@ j2 = MatchGraphJoker(name="son")
 ### Check '>>' helper
 matcher = j1 >> j2 >> j1
 ### Check __str__
-print matcher
+print(matcher)
 ### Ensure form
 assert isinstance(matcher, MatchGraph)
 assert len(matcher.nodes()) == 2