summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2014-01-08 17:28:17 +0100
committerXavier Morel <xmo@openerp.com>2014-01-08 17:28:17 +0100
commit23b8f160d3054a960dcc1aa8e5a46ae19e4ddc21 (patch)
treef032e88193a4746f2a71b78c93fbca2130c56bc0 /addons/analytic_user_function
parent6aa79d8cb3e59b8e8f188efd91749176d3e6aad1 (diff)
[IMP] attempt (again) to fix testing of datetime pattern conversions tests
In order to ensure that the conversion is at least sensible, we test the output of strftime and babel on the same pattern (after conversion from POSIX to LDML for Babel). This requires that both use the same locale. Previously, the default locale was being used(-ish), but it turns out when the locale is unset (getdefaultlocale() returns (None, None) ``strftime`` still manages to use some sort of default locale (C?), whereas Babel will yield the locale None. It turns out the runbot executes the server with no locale-related envvar set, and thus hits this very issue. Assume there are no concurrent tests being run and use setlocale to try and ensure strftime and babel see the same locale. Also, remove tests on %x and %X, turns out libc and babel generally have very different ideas about what constitutes a "national representation" of a date or time, so the patterns don't match in the first place. And I found no way to expand %x/%X into its sub-patterns. bzr revid: xmo@openerp.com-20140108162817-n5gd2oryaszf099k
Diffstat (limited to 'addons/analytic_user_function')
0 files changed, 0 insertions, 0 deletions