diff --git a/CHANGES b/CHANGES index b3687b707..9ede62739 100644 --- a/CHANGES +++ b/CHANGES @@ -37,8 +37,15 @@ Bugs fixed * #1923: Use babel features only if the babel latex element is nonempty. * #1942: Fix a KeyError in websupport. * #1903: Fix strange id generation for glossary terms. -* Fix: ``make text`` will crash if a definition list item has more than 1 classifiers. +* #1796, On py3, automated .mo building cause UnicodeDecodeError +* Fix: ``make text`` will crush if a definition list item has more than 1 classifiers as: +* #1796: On py3, automated .mo building cause UnicodeDecodeError +* ``make text`` will crush if a definition list item has more than 1 classifiers as: +* Fixed #1855: make gettext generates broken po file for definition lists with classifier. + ``term : classifier1 : classifier2``. * #1855: make gettext generates broken po file for definition lists with classifier. +* #1869: Fix problems when dealing with files containing non-ASCII characters. Thanks to + Marvin Schmidt. * #1798: Fix building LaTeX with references in titles. diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py index d75a29454..be7ee3add 100644 --- a/tests/test_directive_code.py +++ b/tests/test_directive_code.py @@ -63,7 +63,7 @@ def test_code_block_caption_html(app, status, warning): @with_app('latex', testroot='directive-code') def test_code_block_caption_latex(app, status, warning): app.builder.build_all() - latex = (app.outdir / 'Python.tex').text() + latex = (app.outdir / 'Python.tex').text(encoding='utf-8') caption = '\\caption{caption \\emph{test} rb}' assert caption in latex @@ -101,7 +101,7 @@ def test_literal_include_dedent(app, status, warning): @with_app('html', testroot='directive-code') def test_literal_include_linenos(app, status, warning): app.builder.build(['linenos']) - html = (app.outdir / 'linenos.html').text() + html = (app.outdir / 'linenos.html').text(encoding='utf-8') linenos = ( '
'
' 1\n'
@@ -124,7 +124,7 @@ def test_literal_include_linenos(app, status, warning):
@with_app('html', testroot='directive-code')
def test_literal_include_lineno_start(app, status, warning):
app.builder.build(['lineno_start'])
- html = (app.outdir / 'lineno_start.html').text()
+ html = (app.outdir / 'lineno_start.html').text(encoding='utf-8')
linenos = (
''
'200\n'
@@ -147,7 +147,7 @@ def test_literal_include_lineno_start(app, status, warning):
@with_app('html', testroot='directive-code')
def test_literal_include_lineno_match(app, status, warning):
app.builder.build(['lineno_match'])
- html = (app.outdir / 'lineno_match.html').text()
+ html = (app.outdir / 'lineno_match.html').text(encoding='utf-8')
pyobject = (
''
' 9\n'
@@ -180,7 +180,7 @@ def test_literal_include_lineno_match(app, status, warning):
@with_app('latex', testroot='directive-code')
def test_literalinclude_file_whole_of_emptyline(app, status, warning):
app.builder.build_all()
- latex = (app.outdir / 'Python.tex').text()
+ latex = (app.outdir / 'Python.tex').text(encoding='utf-8').replace('\r\n', '\n')
includes = (
'\\begin{Verbatim}[commandchars=\\\\\\{\\},numbers=left,firstnumber=1,stepnumber=1]\n'
'\n'
@@ -204,6 +204,6 @@ def test_literalinclude_caption_html(app, status, warning):
@with_app('latex', testroot='directive-code')
def test_literalinclude_caption_latex(app, status, warning):
app.builder.build('index')
- latex = (app.outdir / 'Python.tex').text()
+ latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
caption = '\\caption{caption \\textbf{test} py}'
assert caption in latex