Discussion:
[Python-3000-checkins] r66381 - in python/branches/py3k/Lib/test: test_format.py test_unicode.py
amaury.forgeotdarc
2008-09-10 23:51:42 UTC
Permalink
Author: amaury.forgeotdarc
Date: Thu Sep 11 01:51:42 2008
New Revision: 66381

Log:
The Unicode database was updated to 5.1, and some characters have become printable.
Change the tests and use another code point.


Modified:
python/branches/py3k/Lib/test/test_format.py
python/branches/py3k/Lib/test/test_unicode.py

Modified: python/branches/py3k/Lib/test/test_format.py
==============================================================================
--- python/branches/py3k/Lib/test/test_format.py (original)
+++ python/branches/py3k/Lib/test/test_format.py Thu Sep 11 01:51:42 2008
@@ -216,8 +216,8 @@
testformat("%o", 0o42, "42")
testformat("%o", -0o42, "-42")
testformat("%o", float(0o42), "42")
- testformat("%r", "\u0370", "'\\u0370'") # non printable
- testformat("%a", "\u0370", "'\\u0370'") # non printable
+ testformat("%r", "\u0378", "'\\u0378'") # non printable
+ testformat("%a", "\u0378", "'\\u0378'") # non printable
testformat("%r", "\u0374", "'\u0374'") # printable
testformat("%a", "\u0374", "'\\u0374'") # printable
# Test exception for unknown format characters

Modified: python/branches/py3k/Lib/test/test_unicode.py
==============================================================================
--- python/branches/py3k/Lib/test/test_unicode.py (original)
+++ python/branches/py3k/Lib/test/test_unicode.py Thu Sep 11 01:51:42 2008
@@ -429,7 +429,7 @@
# some defined Unicode character
self.assertTrue("\u0374".isprintable())
# undefined character
- self.assertFalse("\u0370".isprintable())
+ self.assertFalse("\u0378".isprintable())
# single surrogate character
self.assertFalse("\ud800".isprintable())

@@ -611,11 +611,11 @@
self.assertEqual('{0!r}'.format('Hello'), "'Hello'")
self.assertEqual('{0!r:}'.format('Hello'), "'Hello'")
self.assertEqual('{0!r}'.format(F('Hello')), 'F(Hello)')
- self.assertEqual('{0!r}'.format('\u0370'), "'\\u0370'") # nonprintable
+ self.assertEqual('{0!r}'.format('\u0378'), "'\\u0378'") # nonprintable
self.assertEqual('{0!r}'.format('\u0374'), "'\u0374'") # printable
self.assertEqual('{0!r}'.format(F('\u0374')), 'F(\u0374)')
self.assertEqual('{0!a}'.format('Hello'), "'Hello'")
- self.assertEqual('{0!a}'.format('\u0370'), "'\\u0370'") # nonprintable
+ self.assertEqual('{0!a}'.format('\u0378'), "'\\u0378'") # nonprintable
self.assertEqual('{0!a}'.format('\u0374'), "'\\u0374'") # printable
self.assertEqual('{0!a:}'.format('Hello'), "'Hello'")
self.assertEqual('{0!a}'.format(F('Hello')), 'F(Hello)')

Loading...