Test suite fails when `smart_quotes = true` option is set in Docutils config

Dmitry Shachnev avatarDmitry Shachnev created an issue

I have this in my ~/.docutils configuration file:

[restructuredtext parser]
smart_quotes = true

This makes the test suite fail with Python 2.7:

======================================================================
FAIL: Inspect the 'docinfo' metadata stored in the first node of the document.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
AssertionError: u'This document has been placed in the public domain. You\nmay do with it as you [truncated]... != u"This document has been placed in the public domain. You\nmay do with it as you [truncated]...
  This document has been placed in the public domain. You
  may do with it as you wish. You may copy, modify,
  redistribute, reattribute, sell, buy, rent, lease,
  destroy, or improve it, quote it at length, excerpt,
  incorporate, collate, fold, staple, or mutilate it, or do
- anything else to it that your or anyone else\u2019s heart
?                                             ^
+ anything else to it that your or anyone else's heart
?                                             ^
  desires.

======================================================================
FAIL: Inspect the 'docinfo' metadata stored in the first node of the document.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
AssertionError: u'This is a \u201cwork in progress\u201d' != u'This is a "work in progress"'
- This is a \u201cwork in progress\u201d
?           ^                ^
+ This is a "work in progress"
?           ^                ^

Not critical, but it will be a good idea to overwrite that option somehow (Docutils has an API for that).

Comments (0)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.