summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_format.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-02 19:09:54 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-02 19:09:54 (GMT)
commitef87d6ed94780fe00250a551031023aeb2898365 (patch)
tree1f8989aaaec7ec5f8b2f26498317f2022bf85531 /Lib/test/test_format.py
parent572dbf8f1320c0b34b9c786e5c30ba4a4b61b292 (diff)
downloadcpython-ef87d6ed94780fe00250a551031023aeb2898365.zip
cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.gz
cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.bz2
Rip out all the u"..." literals and calls to unicode().
Diffstat (limited to 'Lib/test/test_format.py')
-rw-r--r--Lib/test/test_format.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py
index 658a302..a006bbf 100644
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -35,7 +35,7 @@ def testformat(formatstr, args, output=None):
def testboth(formatstr, *args):
testformat(formatstr, *args)
if have_unicode:
- testformat(unicode(formatstr), *args)
+ testformat(str(formatstr), *args)
testboth("%.1d", (1,), "1")
@@ -216,18 +216,18 @@ def test_exc(formatstr, args, exception, excmsg):
test_exc('abc %a', 1, ValueError,
"unsupported format character 'a' (0x61) at index 5")
if have_unicode:
- test_exc(unicode('abc %\u3000','raw-unicode-escape'), 1, ValueError,
+ test_exc(str('abc %\u3000','raw-unicode-escape'), 1, ValueError,
"unsupported format character '?' (0x3000) at index 5")
test_exc('%d', '1', TypeError, "int argument required, not str")
test_exc('%g', '1', TypeError, "float argument required, not str")
test_exc('no format', '1', TypeError,
"not all arguments converted during string formatting")
-test_exc('no format', u'1', TypeError,
+test_exc('no format', '1', TypeError,
"not all arguments converted during string formatting")
-test_exc(u'no format', '1', TypeError,
+test_exc('no format', '1', TypeError,
"not all arguments converted during string formatting")
-test_exc(u'no format', u'1', TypeError,
+test_exc('no format', '1', TypeError,
"not all arguments converted during string formatting")
class Foobar(int):