Author: Philip Jenvey <[email protected]>
Branch: py3k-stdlib-2.7.6-merge
Changeset: r69878:5ffb127e4fc8
Date: 2014-03-11 16:56 -0700
http://bitbucket.org/pypy/pypy/changeset/5ffb127e4fc8/
Log: merge default
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
@@ -197,14 +197,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):
@@ -317,14 +317,14 @@
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'
def test_ascii(self):
assert "<%a>" % "test" == "<'test'>"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit