diff options
| author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2007-03-21 02:43:26 +0000 |
|---|---|---|
| committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2007-03-21 02:43:26 +0000 |
| commit | 3bfb093457dd422ac030226ea868df4cc31a3067 (patch) | |
| tree | a30676c2909ae20167b8f4bc7f7e175aed37b730 /docutils/test/DocutilsTestSupport.py | |
| parent | ab27f4a7ac1e675ad728ea397f2042fc3671a734 (diff) | |
| download | docutils-3bfb093457dd422ac030226ea868df4cc31a3067.tar.gz | |
replaced 'raw_unicode_escape' with 'ascii', 'backslashreplace' so we don't get latin1 strings
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@5032 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/DocutilsTestSupport.py')
| -rw-r--r-- | docutils/test/DocutilsTestSupport.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docutils/test/DocutilsTestSupport.py b/docutils/test/DocutilsTestSupport.py index 24858c624..5339c9213 100644 --- a/docutils/test/DocutilsTestSupport.py +++ b/docutils/test/DocutilsTestSupport.py @@ -191,11 +191,11 @@ class CustomTestCase(StandardTestCase): def compare_output(self, input, output, expected): """`input`, `output`, and `expected` should all be strings.""" if isinstance(input, UnicodeType): - input = input.encode('raw_unicode_escape') + input = input.encode('ascii', 'backslashreplace') if isinstance(output, UnicodeType): - output = output.encode('raw_unicode_escape') + output = output.encode('ascii', 'backslashreplace') if isinstance(expected, UnicodeType): - expected = expected.encode('raw_unicode_escape') + expected = expected.encode('ascii', 'backslashreplace') try: self.assertEquals(output, expected) except AssertionError, error: @@ -807,7 +807,7 @@ class HtmlWriterPublishPartsTestCase(WriterPublishTestCase): output = [] for key in keys: output.append("%r: '''%s'''" - % (key, parts[key].encode('raw_unicode_escape'))) + % (key, parts[key].encode('ascii', 'backslashreplace'))) if output[-1].endswith("\n'''"): output[-1] = output[-1][:-4] + "\\n'''" return '{' + ',\n '.join(output) + '}\n' |
