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: Allow thread(ing) tests to pass without setting stack size
Type: enhancement Stage: patch review
Components: Tests Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: aimacintyre Nosy List: aimacintyre, ajaksu2, georg.brandl, splitscreen
Priority: low Keywords: patch

Created on 2006-08-02 23:35 by splitscreen, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
thread_tests.diff splitscreen, 2006-08-02 23:35 Version 1
Messages (10)
msg50808 - (view) Author: Matt Fleming (splitscreen) Date: 2006-08-02 23:35
This patch changes Lib/test/test_thread.py to use the
unit test framework. It also allows platforms that do
not support changing the stack size of threads to pass
all thread tests.

Thanks, Matt
msg50809 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-08-14 21:57
Logged In: YES 
user_id=849994

For the 2.5 release, could you please post a patch without
the conversion to unittest?
msg50810 - (view) Author: Matt Fleming (splitscreen) Date: 2006-08-14 22:08
Logged In: YES 
user_id=1126061

Tim Peters expressed that he liked the idea of rewriting the
test using the unittest module. However, I can appreciate
introducing changes in small steps, so if you reply with a
"yes change the tset" I'll have no problem writing another
non-unittest patch.

Matt
msg50811 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-08-14 22:12
Logged In: YES 
user_id=849994

If you get someone else to review the full patch, it's fine
with me.
msg50812 - (view) Author: Andrew I MacIntyre (aimacintyre) * (Python triager) Date: 2006-08-15 13:21
Logged In: YES 
user_id=250749

I should have noted in this item when I checked in rev 51133
that it included the essence of this patch (skipping the
thread stack size testing on platfforms that don't support
the feature) within the existing test framework.  Thus 2.5b3
should correctly handle this situation - if it doesn't,
please say so.

I understood that it was too late in the 2.5 release process
to admit a rewrite and so was waiting for the release to
branch before bringing the patch into the trunk.
msg50813 - (view) Author: Matt Fleming (splitscreen) Date: 2006-08-15 13:45
Logged In: YES 
user_id=1126061

The test doesn't pass because the output produced from
test_thread.py is diffed against Lib/test/output/test_thread

Here's the output from running the test

test test_thread produced unexpected output:
**********************************************************************
*** mismatch between lines 9-18 of expected output and line
9 of actual output:
+ platform does not support changing thread stack size
- caught expected ValueError setting stack_size(4096)
- successfully set stack_size(262144)
- successfully set stack_size(1048576)
- successfully set stack_size(0)
- trying stack_size = 262144
- waiting for all tasks to complete
- all tasks done
- trying stack_size = 1048576
- waiting for all tasks to complete
- all tasks done
***********************************************

msg50814 - (view) Author: Andrew I MacIntyre (aimacintyre) * (Python triager) Date: 2006-08-15 14:32
Logged In: YES 
user_id=250749

Sorry, r51133 went in after 2.5b3, but your test would seem
to be done with a SVN checkout?

As far as I know, the failure you note cannot be resolved
without the rewrite to use unittest (or doctest?), which is
out of scope until after 2.5 - at least not without removing
most of the content of Lib/test/output/test_thread.
msg50815 - (view) Author: Matt Fleming (splitscreen) Date: 2006-08-15 15:01
Logged In: YES 
user_id=1126061

Yes the test was done with an update from trunk as of five
minutes before I posted the message. It's probably just a
better idea for me to shut up, and we'll resolve this after 2.5?
msg84495 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-30 04:23
The relevant tests were converted to unittest and don't rely
Lib/test/output/test_thread anymore. I'll close this unless someone
wants to salvage tests from the patch.
msg86362 - (view) Author: Andrew I MacIntyre (aimacintyre) * (Python triager) Date: 2009-04-23 11:16
Pretty much all the test structure in the patch has made it through the
re-write to unittest, so closed as out of date.
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43767
2009-04-23 11:16:11aimacintyresetstatus: pending -> closed
resolution: out of date
messages: + msg86362
2009-03-30 04:23:16ajaksu2setstatus: open -> pending
priority: normal -> low
type: enhancement

versions: + Python 3.1, Python 2.7, - Python 2.5
nosy: + ajaksu2

messages: + msg84495
stage: patch review
2006-08-02 23:35:27splitscreencreate