diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-02-25 11:09:54 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-03-05 16:52:49 +0100 |
| commit | 02bbb30efea4980c9d133947cbbf69fb599071ad (patch) | |
| tree | 3fea6826fcc5354840a27cb1dc99ff31eef81896 /test/core/graph.py | |
| parent | eab809932871f91d6f4aa770fc321af9e156e0f5 (diff) | |
| download | miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.tar.gz miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.zip | |
Support python2/python3
Diffstat (limited to 'test/core/graph.py')
| -rw-r--r-- | test/core/graph.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/core/graph.py b/test/core/graph.py index b71c3d51..484591b7 100644 --- a/test/core/graph.py +++ b/test/core/graph.py @@ -1,3 +1,4 @@ +from __future__ import print_function from miasm2.core.graph import * g = DiGraph() @@ -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 |