[pypy-commit] pypy fix-tpname: these pass again

bdkearns noreply at buildbot.pypy.org
Fri May 2 03:19:33 CEST 2014


Author: Brian Kearns <bdkearns at gmail.com>
Branch: fix-tpname
Changeset: r71174:74bf9b0ee01f
Date: 2014-05-01 21:18 -0400
http://bitbucket.org/pypy/pypy/changeset/74bf9b0ee01f/

Log:	these pass again

diff --git a/pypy/module/_ast/test/test_ast.py b/pypy/module/_ast/test/test_ast.py
--- a/pypy/module/_ast/test/test_ast.py
+++ b/pypy/module/_ast/test/test_ast.py
@@ -223,19 +223,19 @@
         x = ast.Num()
         assert x._fields == ('n',)
         exc = raises(AttributeError, getattr, x, 'n')
-        assert "Num' object has no attribute 'n'" in exc.value.args[0]
+        assert str(exc.value) == "'Num' object has no attribute 'n'"
 
         x = ast.Num(42)
         assert x.n == 42
         exc = raises(AttributeError, getattr, x, 'lineno')
-        assert "Num' object has no attribute 'lineno'" in exc.value.args[0]
+        assert str(exc.value) == "'Num' object has no attribute 'lineno'"
 
         y = ast.Num()
         x.lineno = y
         assert x.lineno == y
 
         exc = raises(AttributeError, getattr, x, 'foobar')
-        assert "Num' object has no attribute 'foobar'" in exc.value.args[0]
+        assert str(exc.value) == "'Num' object has no attribute 'foobar'"
 
         x = ast.Num(lineno=2)
         assert x.lineno == 2
@@ -407,7 +407,7 @@
 
     def test_issue1673_Num_fullinit(self):
         import ast
-        import copy 
+        import copy
         num_node = ast.Num(n=2,lineno=2,col_offset=3)
         num_node2 = copy.deepcopy(num_node)
         assert num_node.n == num_node2.n


More information about the pypy-commit mailing list