Unit tests fail in non-English locales
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SchoolTool |
In Progress
|
Medium
|
Unassigned |
Bug Description
SchoolTool's unit tests fail in certain non-English locales (e.g. German).
This happens with SchoolTool 0.11.2, SchoolBell 1.2.2, and perhaps other
branches. I'm pretty sure trunk has this problem (although I've been unable to
reproduce it myself).
> =======
> FAIL: schooltool.
> -------
> Traceback (most recent call last):
> File "/usr/local/
line 2187, in runTest
> raise self.failureExc
> AssertionError: Failed doctest test for
schooltool.
> File "/usr/local/
line 88, in doctest_
>.
> -------
> File "/usr/local/
line 112, in schooltool.
> Failed example:
> o = server.
> Expected:
> Reading configuration from ...sample.conf
> st.py: warning: ignored configuration option 'module'
> st.py: warning: ignored configuration option 'domain'
> st.py: warning: ignored configuration option 'path'
> st.py: warning: ignored configuration option 'app_log_file'
> Got:
> Konfiguration von
/usr/local/
...
This can be fixed either by fixing issue 76, or by adding back the workaround
(LC_ALL=C python test.py) to the Makefile.
I do not know who removed that workaround and why, but it used to be in our
Makefile precisely to prevent this bug.
The LC_ALL=C workaround is still there!
I suppose the GNU-extension $LANGUAGE might override $LC_ALL and cause this
problem. Perhaps change that Makefile line to
LANGUAGE= LC_ALL=C $(python) test.py $(TESTFLAGS)
?