Hello,
I am encountering issues while executing the [CPython](
https://github.com/python/cpython/issues/124108) test_locale
test suite on NetBSD 10.0, particularly with the tests related to the strcoll
and strxfrm
functions.
localhost$ ./python -m test test_locale -m test_strcoll_with_diacritic -m test_strxfrm_with_diacritic -v
== CPython 3.14.0a0 (heads/main:401fff7423c, Sep 15 2024, 21:20:00) [GCC 10.5.0]
== NetBSD-10.0-amd64-x86_64-64bit-ELF little-endian
== Python build: debug
== cwd: /home/blue/cpython/build/test_python_worker_28241æ
== CPU count: 6
== encodings: locale=UTF-8 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests
Using random seed: 1742921980
0:00:00 load avg: 0.18 Run 1 test sequentially in a single process
0:00:00 load avg: 0.18 [1/1] test_locale
test_strcoll_with_diacritic (test.test_locale.TestEnUSCollation.test_strcoll_with_diacritic) ... testing with 'en_US.UTF-8'... FAIL
test_strxfrm_with_diacritic (test.test_locale.TestEnUSCollation.test_strxfrm_with_diacritic) ... testing with 'en_US.UTF-8'... FAIL
======================================================================
FAIL: test_strcoll_with_diacritic (test.test_locale.TestEnUSCollation.test_strcoll_with_diacritic)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/blue/cpython/Lib/test/test_locale.py", line 359, in test_strcoll_with_diacritic
self.assertLess(locale.strcoll('à', 'b'), 0)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 126 not less than 0
======================================================================
FAIL: test_strxfrm_with_diacritic (test.test_locale.TestEnUSCollation.test_strxfrm_with_diacritic)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/blue/cpython/Lib/test/test_locale.py", line 368, in test_strxfrm_with_diacritic
self.assertLess(locale.strxfrm('à'), locale.strxfrm('b'))
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'à' not less than 'b'
----------------------------------------------------------------------
Ran 2 tests in 0.013s
FAILED (failures=2)
test test_locale failed
test_locale failed (2 failures)
== Tests result: FAILURE ==
1 test failed:
test_locale
Total duration: 266 ms
Total tests: run=2 (filtered) failures=2
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
localhost$
Environment Variables:
I have configured the following locale-related environment variables in my .profile file:
export LANG="C.UTF-8"
export LC_CTYPE="C.UTF-8"
export LC_COLLATE="C.UTF-8"
export LC_TIME="C.UTF-8"
export LC_NUMERIC="C.UTF-8"
export LC_MONETARY="C.UTF-8"
export LC_MESSAGES="C.UTF-8"
Despite these settings, the tests continue to fail.
I have been unable to find specific documentation in the NetBSD resources regarding the configuration of locale-related environment variables, particularly LC_COLLATE
. Could you provide any suggestions or guidance on how to properly configure locale settings for accurate testing on NetBSD?
Thank you very much for your assistance.