Files @ cce5a8388cde
Branch filter:

Location: kallithea/tox.ini - annotation

Mads Kiilerich
email: don't crash on sending mails with unicode comments without appropriate environment configuration (Issue #275)

For example, on Linux, running `gearbox serve` with LANG=C, would crash in:

File ".../kallithea/lib/celerylib/tasks.py", line 307, in send_email
% (' '.join(recipients), headers, subject, body, html_body))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 224: ordinal not in range(128)

Replacing render with render_unicode works in this case ... but there might be
other problems elsewhere.
[tox]
minversion = 1.8
envlist = py{26,27}-{pytest,nose}

[testenv]
setenv =
    PYTHONHASHSEED = 0
deps =
    nose: nose
    pytest: pytest
commands =
    nose: nosetests {posargs}
    pytest: py.test {posargs}