1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
diff --git a/test/test_parsers/test_rst/test_directives/test_images.py b/test/test_parsers/test_rst/test_directives/test_images.py
index ea3adfa..9743fba 100755
--- a/test/test_parsers/test_rst/test_directives/test_images.py
+++ b/test/test_parsers/test_rst/test_directives/test_images.py
@@ -277,7 +277,7 @@ totest['images'] = [
<literal_block xml:space="preserve">
.. image:: picture.png
:scale: fifty
-""" % DocutilsTestSupport.exception_data(int, "fifty")[1][0]],
+""" % DocutilsTestSupport.exception_data(int, u"fifty")[1][0]],
["""\
.. image:: picture.png
:scale: 50
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 1200ab0..b75844a 100755
--- a/test/test_parsers/test_rst/test_directives/test_tables.py
+++ b/test/test_parsers/test_rst/test_directives/test_tables.py
@@ -12,6 +12,7 @@ from __init__ import DocutilsTestSupport
import os, sys
import csv
+import platform
from docutils.parsers.rst.directives import tables
@@ -34,9 +35,14 @@ else:
# some error messages changed in Python 3.3:
csv_eod_error_str = 'unexpected end of data'
-if sys.version_info < (3,2,4) and not (# backport to 2.7.4
- sys.version_info[:2] == (2,7) and sys.version_info[2] > 3):
+if sys.version_info < (3,2,4) and (
+ # CPython has backported to 2.7.4, PyPy has not
+ platform.python_implementation() == 'PyPy' or not (
+ sys.version_info[:2] == (2,7) and sys.version_info[2] > 3)):
csv_eod_error_str = 'newline inside string'
+# pypy adds a line number
+if platform.python_implementation() == 'PyPy':
+ csv_eod_error_str = 'line 1: ' + csv_eod_error_str
csv_unknown_url = "'bogus.csv'"
if sys.version_info < (3,3,2):
csv_unknown_url = "bogus.csv"
@@ -782,7 +788,7 @@ u"""\
:widths: 0 0 0
\n\
some, csv, data
-""" % DocutilsTestSupport.exception_data(int, "y")[1][0]],
+""" % DocutilsTestSupport.exception_data(int, u"y")[1][0]],
["""\
.. csv-table:: good delimiter
:delim: /
|