[TIP] Model checking Python code
ned at nedbatchelder.com
Sat Sep 5 05:17:02 PDT 2009
Matt Harrison wrote:
> On Fri, Sep 4, 2009 at 11:45 AM, Mark Seaborn<mrs at mythic-beasts.com> wrote:
> snip, snip
>> If there are multiple choices to be made, the multiplying out (to give
>> the Cartesian product) is done by the check runner, which is performing
>> a kind of inversion of control.
>> I'd be interested to hear if anyone has used this kind of technique in
>> Python before, or if anyone thinks it would help solve problems
>> they've encountered before.
> Mark -
> I read your blog post this sounds interesting. In fact I gave a talk
> about a related subject two years ago at pycon. I covered
> cyclomatic complexity, code coverage and how they relate. The problem
> is that Python currently only supports line coverage, which by itself
> is not sufficient to support more advanced tools.
> When you take the people who care about testing, and take the subset
> that care about coverage, and take the subset that care about
> path/model checking, I think that you get a really small percentage of
Count me in the (small) subset. I still intend to get this working.
Can someone come to work and do my real job so I have some time? :)
> Any tool which wants to increase the size of these smaller subsets of
> programmers is going to have to be:
> * Very easy to use
> * Provide some utility
> I need to market, work on pycoverage.el more (which is an even smaller
> subset of the above that use emacs), because I think it lies along the
> path of where you want to go.
> I guess my point is that there are people who find this cool, so don't give up!
> What I'd like is a way to tell which of the paths I've covered from
> the basis paths. (from linear algebra, once you cover the basis paths,
> other paths are just linear combinations of them). (I even messed
> around with the CPython eval loop trying to get more fine grained
> tracing, but real life caught up with me and I moved on).
I'm still confused by the term "linear combinations of paths". What
would a non-linear combination of them be? Why don't people just say,
"combinations of paths"?
> I'm interested in seeing where your project goes. Keep us posted.
> 0 - http://panela.blog-city.com/pycon_2008_managing_complexity_slides.htm
Ned Batchelder, http://nedbatchelder.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python