classification
Title: Run some tests in a loop until failure
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: jnoller, pitrou, r.david.murray
Priority: normal Keywords: patch

Created on 2009-11-12 23:58 by pitrou, last changed 2009-11-14 16:18 by r.david.murray. This issue is now closed.

Files
File name Uploaded Description Edit
looptests.patch pitrou, 2009-11-12 23:58
looptests2.patch pitrou, 2009-11-13 23:58
looptests3.patch r.david.murray, 2009-11-14 03:54
Messages (9)
msg95166 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-11-12 23:58
It can be useful to run one or several of the regression tests in a
loop, until one of the tests fail. Here is a patch to do that.

(interesting thing, by the way: you can combine it with -j, in order to
run several instance of the test at once)
msg95167 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2009-11-13 00:12
+1 I wanted to do this in +1

This is what I wanted to do in http://bugs.python.org/issue7134

I would put this in 2.x and 3.x :)

There was some feedback in this ML thread: 
http://mail.python.org/pipermail/python-dev/2009-June/090238.html
msg95168 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-11-13 00:15
> This is what I wanted to do in http://bugs.python.org/issue7134

Ah, sorry, I hadn't seen it.
msg95169 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2009-11-13 00:16
Oh, no apologies needed. You have a patch! :)
msg95170 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-11-13 00:45
The patch generally looks good to me, but I think you overlooked line
507, where you do a pending.clear() in case of keyboard interrupt in -j
mode.  I tested it on trunk and it seems to work great, except when I
press ctl-C :)
msg95218 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-11-13 23:58
Thank you, here is an update patch.
msg95226 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-11-14 03:54
I still get:

ValueError: No JSON object could be decoded

in one or more of the threads when I hit ctl-c during a -j run.

I've attached an updated patch that fixes the problem, but I'm not sure
it is a correct fix.
msg95241 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-11-14 13:54
> I've attached an updated patch that fixes the problem, but I'm not sure
> it is a correct fix.

Your patch looks fine to me.
msg95242 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-11-14 16:18
Committed to trunk in r76260 and py3k in r76261.
History
Date User Action Args
2009-11-14 16:18:50r.david.murraysetstatus: open -> closed
type: behavior -> enhancement
messages: + msg95242

resolution: accepted
stage: patch review -> resolved
2009-11-14 13:54:39pitrousetmessages: + msg95241
2009-11-14 03:54:23r.david.murraysetfiles: + looptests3.patch

messages: + msg95226
2009-11-13 23:58:05pitrousetfiles: + looptests2.patch

messages: + msg95218
2009-11-13 00:45:21r.david.murraysetmessages: + msg95170
2009-11-13 00:16:05jnollersetmessages: + msg95169
2009-11-13 00:15:01pitrousetmessages: + msg95168
2009-11-13 00:14:40pitroulinkissue7134 superseder
2009-11-13 00:12:27jnollersetmessages: + msg95167
2009-11-12 23:58:25pitroucreate