classification
Title: Fix test discovery for test_locale.py
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.4, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: brett.cannon, ezio.melotti, python-dev, serhiy.storchaka, zach.ware
Priority: normal Keywords: patch

Created on 2013-04-16 19:51 by zach.ware, last changed 2013-07-17 11:36 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
test_locale_discovery.diff zach.ware, 2013-04-16 19:51 test_locale.py fix, version 1 review
test_locale_discovery.v2.diff zach.ware, 2013-06-18 03:09 Version 2 review
test_locale_discovery.v3.diff zach.ware, 2013-07-04 05:30 Version 3 review
Messages (5)
msg187117 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2013-04-16 19:51
This one actually had Failures rather than Errors; those failures arose from enUS_locale being None because it was being changed in test_main.  This patch attempts to fix things by adapting get_enUS_locale() to return a tuple of a suitable setting for enUS_locale and a reason for skipping the tests that were formerly ignored if enUS_locale was None.
msg191387 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2013-06-18 03:09
Looking at this one again, I missed removing the run_unittest import.  Here's a new patch.
msg192272 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2013-07-04 05:30
Here's a new patch addressing Serhiy's Rietveld comment.  This patch also includes the addition of 'flush=True' to the verbose print in BaseLocalizedTest.setUp to make output look a little nicer.
msg193221 - (view) Author: Roundup Robot (python-dev) Date: 2013-07-17 10:27
New changeset 3b883491a5f2 by Serhiy Storchaka in branch '3.3':
Issue #17767: test_locale now works with unittest test discovery.
http://hg.python.org/cpython/rev/3b883491a5f2

New changeset 60e72210683c by Serhiy Storchaka in branch 'default':
Issue #17767: test_locale now works with unittest test discovery.
http://hg.python.org/cpython/rev/60e72210683c
msg193223 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-07-17 11:36
I combined two last Zachary's patches and added more robust locale test cleanup (old locale now restored even when print() in setUp() will failed).

Thank you for your patch Zachary.
History
Date User Action Args
2013-07-17 11:36:52serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg193223

stage: patch review -> resolved
2013-07-17 10:27:12python-devsetnosy: + python-dev
messages: + msg193221
2013-07-17 09:56:22serhiy.storchakasetassignee: serhiy.storchaka
stage: patch review
2013-07-04 05:30:20zach.waresetfiles: + test_locale_discovery.v3.diff

messages: + msg192272
2013-06-28 19:56:47serhiy.storchakasetnosy: + serhiy.storchaka
2013-06-18 03:09:09zach.waresetfiles: + test_locale_discovery.v2.diff

messages: + msg191387
2013-04-16 19:51:12zach.warecreate