[Idle-dev] Non-buildbot human mediated tests
Saimadhav Heblikar
saimadhavheblikar at gmail.com
Mon May 19 04:21:54 CEST 2014
* Improving run() and runall()
I propose slight modification in the way run() and runall() are structured.
run() and runall() could be refactored into a single utility
function(called run())
This function will have an optional parameter. If the function is
being called from another module, then the parameter has to be present
in the call to ensure only the assocated test is run.
If the optional parameter is not present(the case when htest.py is
run,-from if __name__=='__main__' part), then all the tests have to be
run.
Either way, a test_list will will store the *names*(as str's) of
wrapper functions/ callable objects , which when processed by a
utility function, will start a particular test. "_spec" appended to
the name string will give the spec dict.
The same root object will be used irrespective of the number of tests.
Test_list will be popped as soon as the user clicks "next"/ finishes a
test. Once all the tests are done, popping again will raise an index
error signalling the end.
Updating information like current callable object, keywords,
information string etc will be done when the user clicks
"next"/finishes a test.
As far as actual runner code, a button will be used to begin *a*
particular test/as soon as a test gets over.
Based on the name string, the module will be imported and run.(in the
same way as currently present in runall().)
On 16 May 2014 06:23, Terry Reedy <tjreedy at udel.edu> wrote:
> On 5/15/2014 12:26 PM, Saimadhav Heblikar wrote:
>>
>> I was going through the htest.py commit.
>
>
> Code comments should go in a Rietveld code review or a tracker message.
> Questions like the below on the tracker are ok, even if the issue (18104) is
> 'closed'. After a commit, there can also be a response to the commit message
> on the python-checkins list (though one may need to be a committer to post).
> In all three cases, the context is available.
>
>
>> The line klas_kwds['parent'] = root (line 69) and the related comment
>> " # This presumes that Idle consistently uses 'parent'", could cause
>> certain problems with widgets not directly requiring a 'parent'
>
>
> The comment is obsolete; it was written when I was thinking only in terms of
> calling a widget class. I soon discovered that sometimes a wrapper function
> is needed (as in 2 of the 4 cases I tried and included). A corrected comment
> was already included in the module docstring. I just pushed a patch removing
> both obsolete comments and revising the docstrings
>
>
> --
> Terry Jan Reedy
>
> _______________________________________________
> IDLE-dev mailing list
> IDLE-dev at python.org
> https://mail.python.org/mailman/listinfo/idle-dev
More information about the IDLE-dev
mailing list