[PATCH] issue1610: Add tests for convert's topological sort algorithm

Greg Ward greg-hg at gerg.ca
Sat Apr 18 07:40:12 CDT 2009


On Sat, Apr 18, 2009 at 12:14 AM, Nicolas Dumazet <nicdumz at gmail.com> wrote:
> 2009/4/18 Greg Ward <greg-hg at gerg.ca>
>> +Ran 7 tests in 0.003s
>
> The output should probably not include the time. Chances are that the
> runtime will vary, depending on the hardware and load.

D'ohhh!  I totally missed that.  I was focusing entirely on the tests
themselves, naturally.  I suspect the right thing to do is override
and/or monkey patch unittest so it's more amenable to Mercurial tests:
only write to stdout, don't print the time, etc.

But that brings up a good point... from grep'ing the existing tests,
it looks like there are no PyUnit-based tests in Mercurial so far.  Is
there a reason for that?  Or just historical accident, i.e. no one has
gotten around to writing any?  I'm a huge slobbering fan of unit
tests, and I'd rather use the framework in the standard library than
invent a new one for every project.

Greg


More information about the Mercurial-devel mailing list