Hi, 2011/7/28 Stéfan van der Walt <ste...@sun.ac.za>: > On Thu, Jul 28, 2011 at 1:48 PM, Matthew Brett <matthew.br...@gmail.com> > wrote: >> The thread was first about how to deal with the change, and second > > I'm still curious to know of a technical solution with doctests. > Ideally, one would like to specify a set of rules that a line must > pass to know whether it matched. The current system of excluding > certain checks with "+SKIP" flags etc. seems fragile.
Well - you can use the +ELLIPSIS flag, but of course you have ugly and confusing ... in the docstring for the variable bits. > Maybe a person can already do that, I'm not sure? But it would be > handy to simply have an extra rule added that said: "In any line-set > starting with 'array', ignore everything after dtype=" for example. > Then each package would be able to keep a customised set of rules. > > Do you know if doctests supports any sort of manual intervention, like > a plugin system? Actually, I was going to ask you that question :) But yes, there's the NumpyDoctest nose plugin, for example. Using it does mean you have to customize nose somehow - in numpy's case by using the 'numpy.test()' machinery. Sympy I believe has a fair amount of machinery to work with doctests, but I haven't looked at that yet, See you, Matthew _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion