forked from github/pelican
The locale is a global state, and it was not properly reset to
whatever it was before the unitttest possibly changed it.
This is now fixed.
Not restoring the locale led to weird issues: depending on
the order chosen by "python -m unittest discover" to run
the unit tests, some tests would apparently randomly fail
due to the locale not being what was expected.
For example, test_period_in_timeperiod_archive would
call mock('posts/1970/ 1月/index.html',...) instead of
expected mock('posts/1970/Jan/index.html',...) and fail.
|
||
|---|---|---|
| .. | ||
| tests | ||
| themes | ||
| tools | ||
| __init__.py | ||
| contents.py | ||
| generators.py | ||
| log.py | ||
| paginator.py | ||
| readers.py | ||
| rstdirectives.py | ||
| server.py | ||
| settings.py | ||
| signals.py | ||
| urlwrappers.py | ||
| utils.py | ||
| writers.py | ||