From e35799a4de18a2682832910b959e92255aa5419d Mon Sep 17 00:00:00 2001 From: milde Date: Thu, 16 May 2013 20:49:55 +0000 Subject: 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 --- test/test_parsers/test_rst/test_directives/test_tables.py | 12 ++++++++---- 1 file 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"""\ Problems with "csv-table" directive URL "bogus.csv": - unknown url type: bogus.csv. + unknown url type: %s. .. csv-table:: bad URL :url: bogus.csv -"""], +""" % csv_unknown_url], ["""\ .. csv-table:: column mismatch :widths: 10,20 -- cgit v1.2.1