Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r58283:b8a23c0df759
Date: 2012-10-20 22:42 +0200
http://bitbucket.org/pypy/pypy/changeset/b8a23c0df759/
Log: Fix tests to pass with -A
diff --git a/pypy/module/pyexpat/test/test_parser.py
b/pypy/module/pyexpat/test/test_parser.py
--- a/pypy/module/pyexpat/test/test_parser.py
+++ b/pypy/module/pyexpat/test/test_parser.py
@@ -48,7 +48,7 @@
p.CharacterDataHandler = lambda s: data.append(s)
encoding = encoding_arg is None and 'utf-8' or encoding_arg
- res = p.Parse("<xml>\u00f6</xml>".encode(encoding),
isfinal=True)
+ res = p.Parse("<xml>\u00f6</xml>".encode(encoding), True)
assert res == 1
assert data == ["\u00f6"]
@@ -79,7 +79,8 @@
p = pyexpat.ParserCreate()
p.buffer_size = 150
assert p.buffer_size == 150
- raises(TypeError, setattr, p, 'buffer_size', sys.maxint + 1)
+ raises((ValueError, TypeError),
+ setattr, p, 'buffer_size', sys.maxsize + 1)
def test_encoding_xml(self):
# use one of the few encodings built-in in expat
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit