Hi Florent,
On Tue, Nov 17, 2009 at 09:05:23AM +0100, Florent hivert wrote:
> > > I just spent/lost one hour on the following missfeature (at least in my
> > > opinion) of TestsSuite... Mind the "..." ;-) Those dots are particularly
> > > heavy
> > > dots... Still don't get it ?
> > >
> > > Try
> > > myself._test_my_reaction() ... done ?
> > > Anything happening ? No ? Really nothing ?
> > > Then read below...
> > >
> > > When testing something in verbose mode the typical output of sage is:
> > >
> > > sage: P = Sets().example("inherits")
> > > sage: TestSuite(P).run(verbose=True)
> > > running ._test_an_element() ... done
> > > running ._test_element_pickling() ... done
> > > running ._test_not_implemented_methods() ... done
> > > running ._test_pickling() ... done
> > > running ._test_some_elements() ... done
> > >
> > > The problem arise if I want to tests this in a doctests. The "..." match
> > > anything. Therefore if I add a new test, which for example output
> > >
> > > running ._test_an_element() ... done
> > > running ._test_element_pickling() ... done
> > > running ._test_len() ... done
> > > running ._test_not_implemented_methods() ... done
> > > running ._test_pickling() ... done
> > > running ._test_some_elements() ... done
> > >
> > > The two lines
> > > running ._test_element_pickling() ... done
> > > running ._test_len() ... done
> > > are matched by the pattern:
> > > running ._test_element_pickling() ... done
> > > and therefore no error is detected... I'm very doubtful that this is on
> > > purpose. Is it. I has the nice consequence that adding a _test_ methods
> > > very
> > > low in the Category Hierarchy (I was adding one in Objects) doesn't break
> > > anything as soon as you are not too at the beginning or the end of the
> > > alphabet.
It was not originally on purpose. But I left it on purpose because of
the practicality of this "feature". And I am pretty sure I had
advertised it to you.
> But I don't think it's a good. Idea.
I agree it's a bit tricky.
> > > Is there a way to deactivate this "..." matching or should we
> > > systematically
> > > change those "..." by for example ". . ." ?
> > >
> >
> > Ouch! I wish you would change "..." to something else, e.g., ".."
> >
> > running ._test_element_pickling() .. done
I am fine with this change, as long as whoever does it takes the
responsibility of systematically updating all such doctests each time
a new test is added somewhere in the hierarchy :-)
By the way I prefer ". . ." to ".." which gives better visual feed
back on what's going on (a computation is being run).
Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" <[email protected]>
http://Nicolas.Thiery.name/
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---