summaryrefslogtreecommitdiff
path: root/test/test_parsers/test_rst/test_directives/test_tables.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_parsers/test_rst/test_directives/test_tables.py')
-rwxr-xr-xtest/test_parsers/test_rst/test_directives/test_tables.py12
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