]> granicus.if.org Git - python/commitdiff
Use raw-unicode-escape for the tests that require it.
authorMartin v. Löwis <martin@v.loewis.de>
Fri, 17 Aug 2001 22:08:34 +0000 (22:08 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Fri, 17 Aug 2001 22:08:34 +0000 (22:08 +0000)
Lib/test/test_b1.py
Lib/test/test_format.py

index 18b426f8318dc552941056353b9be639132d2e6c..46a6da0bc75370e6b5a0794ee83a4f7792805a37 100644 (file)
@@ -256,7 +256,7 @@ if float("  3.14  ") != 3.14:  raise TestFailed, 'float("  3.14  ")'
 if have_unicode:
     if float(unicode("  3.14  ")) != 3.14:
         raise TestFailed, 'float(u"  3.14  ")'
-    if float(unicode("  \u0663.\u0661\u0664  ")) != 3.14:
+    if float(unicode("  \u0663.\u0661\u0664  ",'raw-unicode-escape')) != 3.14:
         raise TestFailed, 'float(u"  \u0663.\u0661\u0664  ")'
 
 print 'getattr'
@@ -363,7 +363,7 @@ if have_unicode:
         (unicode('100'), 100),
         (unicode('314'), 314),
         (unicode(' 314'), 314),
-        (unicode('\u0663\u0661\u0664 '), 314),
+        (unicode('\u0663\u0661\u0664 ','raw-unicode-escape'), 314),
         (unicode('  \t\t  314  \t\t  '), 314),
         (unicode('  1x'), ValueError),
         (unicode('  1  '), 1),
index a89ed52e92a460ab44c9d9f054219cbbacd8ccb6..127a407dcc9acdc4ceebec47cde9d7caafbd3e5a 100644 (file)
@@ -214,5 +214,5 @@ 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'), 1, ValueError,
+    test_exc(unicode('abc %\u3000','raw-unicode-escape'), 1, ValueError,
              "unsupported format character '?' (0x3000) at index 5")