← Back to team overview

subunit-dev team mailing list archive

Re: progress/enumeration

 

On Mon, 2009-03-02 at 18:53 +1300, Jonathan Lange wrote:
> On Mon, Mar 2, 2009 at 6:10 PM, Robert Collins
> <robertc@xxxxxxxxxxxxxxxxx> wrote:
> > I've been thinking, I miss progress bars with subunit.
> >
> > However, forcing test enumeration up front is bad, and a 'tap' approach
> > of saying 'there are 4000' tests interferes with filters.
> >
> > So, how about a progress specific feature:
> > progress: X/Y
> > where X and Y are whole numbers.
> >
> > Filters that delete tests can choose to increase X, or decrease Y,
> > before passing it on (or even eliminate it altogether).
> >
> > Calling countTests on a ProtocolClient would give you Y, for the last Y
> > seen.
> >
> > Or something.
> >
> 
> Sounds good to me.
> 
> What API do you intend for getting the current progress?

Well, I was thinking that things like a TestResultWithProgress could do
something like (in startTest)
pb.update("running", self.tests_run, test.countTests())

probably not hugely efficient in general, but it would be tolerable.

We don't have a concept of 'stream of tests' in unittest to work with,
which *would* be the right place to own 'how far through are we'.

Perhaps we should - but that seems likely to be a large API change
rather than a tweak.

-Rob

Attachment: signature.asc
Description: This is a digitally signed message part


References