test_errors_warnings fails with Python 3 and LC_ALL=C

Jakub Wilk avatarJakub Wilk created an issue

When test_config.test_errors_warnings is run using Python 3 and LC_ALL is set to C, it fails with the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/usr/lib/python3/dist-packages/nose/util.py", line 622, in newfunc
    return func(*arg, **kw)
  File "/tmp/sphinx-1.1.2/build/lib/tests/util.py", line 214, in new_func
    func(tempdir, *args, **kwds)
  File "/tmp/sphinx-1.1.2/build/lib/tests/test_config.py", line 94, in test_errors_warnings
    cfg = Config(dir, 'conf.py', {}, None)
  File "../sphinx/config.py", line 200, in __init__
    source = f.read()
  File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
Exception: 'ascii' codec can't decode byte 0xc3 in position 34: ordinal not in range(128)

Comments (1)

  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.