[pypy-commit] pypy default: py3k compat
pjenvey
noreply at buildbot.pypy.org
Wed Mar 12 01:02:20 CET 2014
Author: Philip Jenvey <pjenvey at underboss.org>
Branch:
Changeset: r69875:1fa52d46dfdc
Date: 2014-03-11 16:54 -0700
http://bitbucket.org/pypy/pypy/changeset/1fa52d46dfdc/
Log: py3k compat
diff --git a/pypy/objspace/std/test/test_stringformat.py b/pypy/objspace/std/test/test_stringformat.py
--- a/pypy/objspace/std/test/test_stringformat.py
+++ b/pypy/objspace/std/test/test_stringformat.py
@@ -208,14 +208,14 @@
prec = 2**31
format_string = "%.{}f".format(prec)
exc = raises(ValueError, "format_string % 2.34")
- assert exc.value[0] == 'prec too big'
+ assert str(exc.value) == 'prec too big'
raises(OverflowError, lambda: u'%.*f' % (prec, 1. / 7))
def test_formatting_huge_width(self):
import sys
format_string = "%{}f".format(sys.maxsize + 1)
exc = raises(ValueError, "format_string % 2.34")
- assert exc.value[0] == 'width too big'
+ assert str(exc.value) == 'width too big'
class AppTestWidthPrec:
def test_width(self):
@@ -341,11 +341,11 @@
prec = 2**31
format_string = u"%.{}f".format(prec)
exc = raises(ValueError, "format_string % 2.34")
- assert exc.value[0] == 'prec too big'
+ assert str(exc.value) == 'prec too big'
raises(OverflowError, lambda: u'%.*f' % (prec, 1. / 7))
def test_formatting_huge_width(self):
import sys
format_string = u"%{}f".format(sys.maxsize + 1)
exc = raises(ValueError, "format_string % 2.34")
- assert exc.value[0] == 'width too big'
+ assert str(exc.value) == 'width too big'
More information about the pypy-commit
mailing list