classification
Title: test_locale error on AIX
Type: Stage: resolved
Components: Tests Versions: Python 3.8, Python 3.7, Python 3.6, Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Michael.Felt, alef, sable, vstinner
Priority: normal Keywords:

Created on 2011-02-11 14:59 by sable, last changed 2018-08-28 09:04 by vstinner. This issue is now closed.

Messages (7)
msg128398 - (view) Author: Sébastien Sablé (sable) Date: 2011-02-11 14:59
I have the following errors on test_locale on AIX:

======================================================================
FAIL: test_strcoll_with_diacritic (test.test_locale.TestEnUSCollation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/san_cis/home/cis/.buildbot/python-aix6/3.x.phenix.xlc/build/Lib/test/test_locale.py", line 364, in test_strcoll_with_diacritic
    self.assertLess(locale.strcoll('à', 'b'), 0)
AssertionError: 1 not less than 0

======================================================================
FAIL: test_strxfrm_with_diacritic (test.test_locale.TestEnUSCollation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/san_cis/home/cis/.buildbot/python-aix6/3.x.phenix.xlc/build/Lib/test/test_locale.py", line 367, in test_strxfrm_with_diacritic
    self.assertLess(locale.strxfrm('à'), locale.strxfrm('b'))
AssertionError: '\u01e2\u0100' not less than '\u0164\u0100'

----------------------------------------------------------------------
Ran 35 tests in 0.020s

FAILED (failures=2)

I haven't investigated yet.
msg128407 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-02-11 16:03
See also issue #11193 (another locale issue on AIX).
msg271286 - (view) Author: Michael Felt (Michael.Felt) * Date: 2016-07-25 15:27
FYI: this seems to still be current, although issue11193 seems okay.

michael@x071:[/data/prj/aixtools/python/python-3.6.0.162/Lib/test]../../python test_locale.py
..................testing with 'en_US.ISO8859-1'... .testing with 'en_US.ISO8859-1'... Ftesting with 'en_US.ISO8859-1'... .testing with 'en_US.ISO8859-1'... F.....................s....testing with 'en_US.ISO8859-1'... .testing with 'en_US.ISO8859-1'... .testing with 'en_US.ISO8859-1'... .testing with 'en_US.ISO8859-1'... .testing with 'en_US.ISO8859-1'... .testing with 'en_US.ISO8859-1'... .testing with 'en_US.ISO8859-1'... ....
======================================================================
FAIL: test_strcoll_with_diacritic (__main__.TestEnUSCollation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_locale.py", line 362, in test_strcoll_with_diacritic
    self.assertLess(locale.strcoll('▒', 'b'), 0)
AssertionError: 1 not less than 0

======================================================================
FAIL: test_strxfrm_with_diacritic (__main__.TestEnUSCollation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_locale.py", line 365, in test_strxfrm_with_diacritic
    self.assertLess(locale.strxfrm('▒'), locale.strxfrm('b'))
AssertionError: '\u01e2\u0100' not less than '\u0164\u0100'

----------------------------------------------------------------------
Ran 58 tests in 0.050s

FAILED (failures=2, skipped=1)

FYI: make check for libiconv-1.14 has exit status 0.
msg271288 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-07-25 15:37
I know that test_locale fails on AIX, but I don't think that it's an issue in Python itself. Python exposes OS functions. I suggest to simply skip failing tests on AIX!
msg324095 - (view) Author: Michael Felt (Michael.Felt) * Date: 2018-08-25 19:33
FYI - this test passes on Python3.X and Python3.7 bots, still fails on Python2.7

In short "fixed" for Python3.
msg324226 - (view) Author: Michael Felt (Michael.Felt) * Date: 2018-08-28 09:02
Ok - testing other Python3 versions:

3.4.9 - failed
3.5.5 - failed

3.7.0 - passes - ah - but due to skip tests!
test_strcoll (test.test_locale.TestEnUSCollation) ... testing with 'en_US.ISO8859-1'... ok
test_strcoll_with_diacritic (test.test_locale.TestEnUSCollation) ... skipped 'bpo-29972: broken test on AIX'
test_strxfrm (test.test_locale.TestEnUSCollation) ... testing with 'en_US.ISO8859-1'... ok
test_strxfrm_with_diacritic (test.test_locale.TestEnUSCollation) ... skipped 'bpo-29972: broken test on AIX'

So, I guess it is still an issue to be examined, just not urgently.
msg324227 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-08-28 09:04
> So, I guess it is still an issue to be examined, just not urgently.

The test pass in the master branch, so I close the issue.

If you want to do something, discuss with the maintainers of AIX C library to ask them if strcoll() work as expected according to them.
History
Date User Action Args
2018-08-28 09:04:33vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg324227

stage: resolved
2018-08-28 09:02:20Michael.Feltsetmessages: + msg324226
versions: + Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8, - Python 3.2
2018-08-25 19:33:39Michael.Feltsetmessages: + msg324095
components: + Tests
2016-07-25 15:37:45vstinnersetmessages: + msg271288
2016-07-25 15:27:22Michael.Feltsetnosy: + Michael.Felt
messages: + msg271286
2013-03-14 13:36:47alefsetnosy: + alef
2011-02-11 16:03:31vstinnersetnosy: + vstinner
messages: + msg128407
2011-02-11 14:59:01sablecreate