Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1528)

Unified Diff: Lib/test/test_unicodedata.py

Issue 52081: [issue3672] Ill-formed surrogates not treated as errors during encoding/decoding (Closed) Base URL: http://svn.python.org/view/*checkout*/python/branches/pep-0383/
Patch Set: Addressed first round of comments Created 14 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_unicode.py ('k') | Objects/unicodeobject.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Lib/test/test_unicodedata.py
===================================================================
--- Lib/test/test_unicodedata.py (revision 72153)
+++ Lib/test/test_unicodedata.py (working copy)
@@ -13,6 +13,7 @@
import test.support
encoding = 'utf-8'
+errors = 'surrogates'
### Run tests
@@ -61,7 +62,7 @@
(char + 'ABC').title(),
]
- h.update(''.join(data).encode(encoding))
+ h.update(''.join(data).encode(encoding, errors))
result = h.hexdigest()
self.assertEqual(result, self.expectedchecksum)
« no previous file with comments | « Lib/test/test_unicode.py ('k') | Objects/unicodeobject.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b