homepage

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: Fix test discovery for test_multiprocessing.py
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, ezio.melotti, python-dev, sbt, zach.ware
Priority: normal Keywords: patch

Created on 2013年04月17日 17:01 by zach.ware, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_multiprocessing_discovery.diff zach.ware, 2013年04月17日 17:01 test_multiprocessing.py fix, version 1
test_multiprocessing_discovery.v2.diff zach.ware, 2013年04月19日 17:39 Version 2 against default branch review
test_multiprocessing_discovery.v3.diff zach.ware, 2013年07月09日 15:12 Version 3, default branch review
test_multiprocessing_discovery.v3-3.3.diff zach.ware, 2013年07月09日 15:13 Version 3, 3.3 branch (including backports)
Messages (6)
msg187181 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2013年04月17日 17:01
I think this one only didn't work with discovery by accident: the only change necessary to make discovery pass was to make _TestPoll match all other _Test* classes by inheriting from BaseTestCase instead of unittest.TestCase. The remainder of the changes are to eliminate test_main by converting it instead to setUpModule. setUpModule is, I think, necessary on this one due to a failing test in WithProcessesTestLogging when the initial call to multiprocessing.get_logger().setLevel() (originally in test_main) is moved to top-level code.
msg187332 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013年04月19日 02:34
The patch doesn't seem to apply cleanly on 3.3 (and on default too).
msg187379 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2013年04月19日 17:39
Hmmm, it looks a couple of things have gone wrong. First, I didn't try the patch on 3.3, whose test_multiprocessing is significantly different than default's. This appears to be due largely to dd5e98ddcd39, but there have been other changes to only default since then as well. As it turns out, 3.3 passes default's test_multiprocessing, so is there any reason not to backport all of the changes to 3.3 to keep the two the same? FTR, the changesets not backported are (in order): dd5e98ddcd39, 7d69d04522e3, 2dc08789ad3e, and 2966e5a55396.
Secondly, the patch doesn't apply to default because a new test was added shortly after I submitted the patch. The only real change to my patch to deal with this is the line numbers of hunk 2, and the removed testcases_other has an extra line removed. Here's a new version of the patch which applies cleanly to default. I'll leave 3.3 for now until it's decided whether or not to backport changes to it.
msg192756 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2013年07月09日 15:12
Since there's been another test added since the last version of this patch, here's a new patch again. I'll also be attaching a patch to 3.3, which includes backports of the 4 changesets mentioned in my last message, as well as the changes for this issue.
msg193174 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013年07月16日 14:58
New changeset 8a922b28b97d by Richard Oudkerk in branch '3.3':
Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
http://hg.python.org/cpython/rev/8a922b28b97d
New changeset c704735487ae by Richard Oudkerk in branch 'default':
Issue #17778: Fix test discovery for test_multiprocessing. (Patch by
http://hg.python.org/cpython/rev/c704735487ae 
msg193177 - (view) Author: Richard Oudkerk (sbt) * (Python committer) Date: 2013年07月16日 15:45
Thanks for the patches!
History
Date User Action Args
2022年04月11日 14:57:44adminsetgithub: 61978
2013年07月16日 15:45:08sbtsetstatus: open -> closed
resolution: fixed
messages: + msg193177

stage: patch review -> resolved
2013年07月16日 14:58:43python-devsetnosy: + python-dev
messages: + msg193174
2013年07月09日 15:13:07zach.waresetfiles: + test_multiprocessing_discovery.v3-3.3.diff
2013年07月09日 15:12:35zach.waresetfiles: + test_multiprocessing_discovery.v3.diff

messages: + msg192756
2013年04月19日 17:39:43zach.waresetfiles: + test_multiprocessing_discovery.v2.diff

messages: + msg187379
2013年04月19日 09:39:59sbtsetnosy: + sbt
2013年04月19日 02:34:45ezio.melottisetmessages: + msg187332
stage: patch review
2013年04月17日 17:01:22zach.warecreate

AltStyle によって変換されたページ (->オリジナル) /