diff options
| author | Camille Mougey <commial@gmail.com> | 2019-03-07 14:37:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-07 14:37:07 +0100 |
| commit | 4c2320b46250a8d6f8774e1218544b72a154cd8e (patch) | |
| tree | b67e7b072439f84109bd39dad8ed7f3f135224f8 /test/core/graph.py | |
| parent | eab809932871f91d6f4aa770fc321af9e156e0f5 (diff) | |
| parent | 26c1075723a02984da6d3bc7423c5c0c43082dc3 (diff) | |
| download | miasm-4c2320b46250a8d6f8774e1218544b72a154cd8e.tar.gz miasm-4c2320b46250a8d6f8774e1218544b72a154cd8e.zip | |
Merge pull request #990 from serpilliere/support_python2_python3
Support python2 python3
Diffstat (limited to 'test/core/graph.py')
| -rw-r--r-- | test/core/graph.py | 17 |
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 |