New testing framework

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Mon Jun 14 08:48:36 CDT 2010


On Mon, Jun 14, 2010 at 3:35 PM, Greg Ward <greg at gerg.ca> wrote:
> On Sat, Jun 12, 2010 at 8:52 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>
> [me, showing a rather hairy example from the bfiles test suite]
> ...
> [Peter's reaction]
>> I fully appreciate the need to get the tests running on Windows. But
>> the above is simply too hard to read. One of my goals (and I guess
>> Martin's) is to have examples in documentation that are actually
>> tests. Which would again mean we need readable tests.
>
> Guilty as charged.  I have concentrated on portability and
> expressiveness rather than readability.  However...
>
> [Adrian points out]
>> I'm not sure how much that above testcase is representative for
>> readability of the average testcase.
>
> Exactly right.  That was a fairly hairy example that demonstrates the
> power of testing in Python (direct access to system calls).
>...

I grant all that. But one of my points is I want a framework that can
be used to drive examples in documentation. Expecting users to
understand basic bash rather than the current state of the bfiles
tests sounds more reasonable to me. Now maybe this documentation
requirement does not belong here, but I'd rather we explored some more
before discarding it. Look here for an example:

  http://www.arrenbrecht.ch/mercurial/pbranch/simple.htm
  http://www.arrenbrecht.ch/mercurial/german-hgbook.htm#pagetoc__2

I do like the direction your pre/post idea is going.
-parren


More information about the Mercurial-devel mailing list