This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bsddb: test_queue fails on Windows
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: benjamin.peterson, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2014-11-25 23:36 by benjamin.peterson, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bsddbtests_ascii_letters.patch serhiy.storchaka, 2014-11-26 08:30 review
Messages (6)
msg231687 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2014-11-25 23:36
One gets this on the Windows bots:

======================================================================
FAIL: test01_basic (bsddb.test.test_queue.SimpleQueueTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\bsddb\test\test_queue.py", line 49, in test01_basic
    self.assertEqual(len(d), len(string.letters)+3)
AssertionError: 125 != 128

======================================================================
FAIL: test02_basicPost32 (bsddb.test.test_queue.SimpleQueueTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\bsddb\test\test_queue.py", line 120, in test02_basicPost32
    self.assertEqual(len(d), len(string.letters)+3)
AssertionError: 125 != 128

----------------------------------------------------------------------

(See http://buildbot.python.org/all/builders/x86%20Windows7%202.7/builds/2925/steps/test/logs/stdio)

This has been going on for a long time. I doubt anyone cares. I'm just going to disable the test.
msg231688 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-11-25 23:37
New changeset e5ed983bc784 by Benjamin Peterson in branch '2.7':
disable tests that always fail on windows (#22943)
https://hg.python.org/cpython/rev/e5ed983bc784
msg231698 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-11-26 08:30
This test is locale-depending. string.letters is the collection of 8-bit characters for which islower() or isupper() is true. On most Unixes the locale is either UTF-8 or ASCII and string.letters contains only ASCII letters. On most Windows it contains characters from extended ASCII, and the length of string.letters can be larger than 75 (minimal non-replacement index used in tests).

There is two simple way to fix this issue.
1) increase test indices to be larger than 255.
2) use string.ascii_letters instead of string.letters.

Here is the patch which uses the second approach (because string.letters is used in other tests).
msg231908 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-11-30 22:22
Does it look good to you Benjamin?
msg231909 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2014-11-30 22:28
Yes, please apply.
msg231913 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-12-01 08:46
New changeset df17d2b0878f by Serhiy Storchaka in branch '2.7':
Issue #22943: bsddb tests are locale independend now.
https://hg.python.org/cpython/rev/df17d2b0878f
History
Date User Action Args
2022-04-11 14:58:10adminsetgithub: 67132
2014-12-01 08:54:06serhiy.storchakasetstatus: open -> closed
assignee: serhiy.storchaka
resolution: fixed
stage: patch review -> resolved
2014-12-01 08:46:12python-devsetmessages: + msg231913
2014-11-30 22:28:38benjamin.petersonsetmessages: + msg231909
2014-11-30 22:22:03serhiy.storchakasetmessages: + msg231908
2014-11-26 08:30:26serhiy.storchakasetfiles: + bsddbtests_ascii_letters.patch

nosy: + serhiy.storchaka
messages: + msg231698

keywords: + patch
stage: needs patch -> patch review
2014-11-25 23:37:34python-devsetnosy: + python-dev
messages: + msg231688
2014-11-25 23:36:39benjamin.petersoncreate