diff options
author | Carl Friedrich Bolz-Tereick <cfbolz@gmx.de> | 2021-02-03 10:49:53 +0100 |
---|---|---|
committer | Carl Friedrich Bolz-Tereick <cfbolz@gmx.de> | 2021-02-03 10:49:53 +0100 |
commit | 9010806b28bfa59392341e28fc7980234f03d441 (patch) | |
tree | 9abc194d923fab399fa450858377f0ba849eb678 /pypy | |
parent | merge branch to update Tk/Tcl to 8.6 on windows (diff) | |
download | pypy-9010806b28bfa59392341e28fc7980234f03d441.tar.gz pypy-9010806b28bfa59392341e28fc7980234f03d441.tar.bz2 pypy-9010806b28bfa59392341e28fc7980234f03d441.zip |
fix test_ast.
Diffstat (limited to 'pypy')
-rw-r--r-- | pypy/interpreter/astcompiler/test/test_ast.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pypy/interpreter/astcompiler/test/test_ast.py b/pypy/interpreter/astcompiler/test/test_ast.py index 2affff7f62..c66e9950a9 100644 --- a/pypy/interpreter/astcompiler/test/test_ast.py +++ b/pypy/interpreter/astcompiler/test/test_ast.py @@ -8,7 +8,7 @@ class TestAstToObject: value = space.wrap(42) node = ast.Num(value, lineno=1, col_offset=1) w_node = node.to_object(space) - assert space.getattr(w_node, space.wrap("n")) is value + assert space.is_w(space.getattr(w_node, space.wrap("n")), value) def test_expr(self, space): value = space.wrap(42) @@ -16,8 +16,8 @@ class TestAstToObject: expr = ast.Expr(node, lineno=1, col_offset=1) w_node = expr.to_object(space) # node.value.n - assert space.getattr(space.getattr(w_node, space.wrap("value")), - space.wrap("n")) is value + assert space.is_w(space.getattr(space.getattr(w_node, space.wrap("value")), + space.wrap("n")), value) def test_operation(self, space): val1 = ast.Num(space.wrap(1), lineno=1, col_offset=1) @@ -35,7 +35,7 @@ class TestAstToObject: space.setattr(w_node, space.wrap('lineno'), space.wrap(1)) space.setattr(w_node, space.wrap('col_offset'), space.wrap(1)) node = ast.Num.from_object(space, w_node) - assert node.n is value + assert space.is_w(node.n, value) def test_fields(self, space): w_fields = space.getattr(ast.get(space).w_FunctionDef, |