Issues

Issue #1129 new

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

Dmitry 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 (2)

  1. Log in to comment