diff options
author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2013-05-16 20:49:55 +0000 |
---|---|---|
committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2013-05-16 20:49:55 +0000 |
commit | e35799a4de18a2682832910b959e92255aa5419d (patch) | |
tree | 28b35f1fbf734a7fc5efe8c094de698dbe548369 | |
parent | f68f0da3eb5556640e8f4e64d8b49cb87959b954 (diff) | |
download | docutils-e35799a4de18a2682832910b959e92255aa5419d.tar.gz |
Fix [ 235 ] Python 2.3.3 uses repr when printing unknown url type in urlopen.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7663 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
-rwxr-xr-x | test/test_parsers/test_rst/test_directives/test_tables.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/test_parsers/test_rst/test_directives/test_tables.py b/test/test_parsers/test_rst/test_directives/test_tables.py index e0b378554..24e520ce6 100755 --- a/test/test_parsers/test_rst/test_directives/test_tables.py +++ b/test/test_parsers/test_rst/test_directives/test_tables.py @@ -32,9 +32,13 @@ if isinstance(unichr_exception, OverflowError): else: unichr_exception_string = str(unichr_exception) -csv_eod_error_str = "unexpected end of data" +# some error messages changed in Python 3.3: +csv_eod_error_str = 'unexpected end of data' if sys.version_info < (3,3): - csv_eod_error_str = "newline inside string" + csv_eod_error_str = 'newline inside string' +csv_unknown_url = "'bogus.csv'" +if sys.version_info < (3,3,2): + csv_unknown_url = "bogus.csv" def null_bytes(): import csv @@ -576,11 +580,11 @@ u"""\ <system_message level="4" line="1" source="test data" type="SEVERE"> <paragraph> Problems with "csv-table" directive URL "bogus.csv": - unknown url type: bogus.csv. + unknown url type: %s. <literal_block xml:space="preserve"> .. csv-table:: bad URL :url: bogus.csv -"""], +""" % csv_unknown_url], ["""\ .. csv-table:: column mismatch :widths: 10,20 |