[Python-Dev] What is test__locale supposed to test, anyhow?
Nick Bastin
nbastin at opnet.com
Wed Jul 14 06:35:19 CEST 2004
On Jul 13, 2004, at 6:11 PM, Martin v. Löwis wrote:
> Nick Bastin wrote:
>> test__locale, as written, tests that the data we get from
>> nl_langinfo() matches the data acquired from localeconv(), but it
>> doesn't actually make sure that any part of this data is correct. Is
>> this intentional?
>
> Yes, see python.org/sf/798145. The test checks that the emulated
> nl_langinfo matches the emulated localeconv for the LC_NUMERIC
> category.
>
> These days, we are not supposed to emulate LC_NUMERIC anymore, so the
> test is somewhat pointless now.
Well, it's not completely pointless - it's pointing out that localeconv
information generated by Python, at least on MacOS X, is incorrect.
> Checking for the actual data will indeed trigger alot of 'failures'.
> Some of these might be debatable, because it might not be clear that
> the reference data you compare against is universally agreed upon
> among the people who live in that locale.
Well, it seems we ought to have *some* kind of test that _locale is
working properly. The current test doesn't seem to fit the bill.
--
Nick
More information about the Python-Dev
mailing list