+1 from me as well. David On Tue, Jun 23, 2009 at 4:29 AM, Franco Saliola <sali...@gmail.com> wrote:
> > On Tue, Jun 23, 2009 at 8:05 AM, Robert > Bradshaw<rober...@math.washington.edu> wrote: > > > > On Jun 22, 2009, at 11:44 AM, Nicolas M. Thiery wrote: > > > >> On Thu, Jun 18, 2009 at 09:29:46AM -0700, Nicolas ThiƩry wrote: > >>> On Thu, Jun 18, 2009 at 04:40:50PM +0200, William Stein wrote: > >>>> On Thu, Jun 18, 2009 at 9:03 AM, Nicolas M. > >>>>> To ease the reviewing of the category code, and also to make it > >>>>> more > >>>>> generic and useful, I have extracted the test framework code out of > >>>>> the categories and into SageObject. > >>>>> > >>>>> See also: http://groups.google.com/group/sage-devel/msg/ > >>>>> 0586b64f72435629 > >>>>> > >>>>> Anyone up for reviewing it? > >>>> > >>>> Change the name from obj.check() to obj._check(). It is not > >>>> reasonable that if one does obj.<tab> on *any* Sage object, one > >>>> sees check. > >>> > >>> Thanks for the feedback. I readily changed the .tester gadget to > >>> ._tester as you suggested; this one was definitely internal. I am not > >>> so sure though for .check, and for all the .test_... methods: > >>> > >>> - I definitely see the point of not cluttering the tab completion > >>> x.<tab>, in particular when x=1. > >>> > >>> - On the other hand, this is a functionality we definitely want to > >>> advertise, and not just among developers. Things like > >>> .test_associativity are also a tool for users who want to test > >>> conjectural mathematical properties of their pet algebraic > >>> structure (say a semi-group). This is one of my big motivations > >>> for the category stuff: empowering any user to construct in a > >>> couple lines such a structure. > >>> > >>> - I tried to stay close to the testunit conventions, where the test > >>> methods are named .test*. But anyway we are already not quite > >>> consistent with it, since we make the abuse of merging together a > >>> SageObject and its TestCase. > >>> > >>> - We also don't want different naming conventions for testing > >>> parents, elements, or other sage objects. > >>> > >>> So, before proceeding, I would like to be sure that there is a > >>> consensus there, especially since I already advertised this > >>> functionality quite some, and the issued had not been raised yet > >>> (I am > >>> a bit lazy also, since I would now need to do the changes in a couple > >>> patches). > >> > >> No feedback? Beware: if no one care, I'll shortly put back the "needs > >> review" flag on the patch :-) > > > > I'm also in favor of _test_X to avoid cluttering up the tab > > completion. Another option to increase visibility would be to have a > > test object, e.g. > > > > sage: foo.test.associativity() > > True > > +1. I think it merges the two concerns together nicely (visibility and > avoiding clutter). > > Franco > > -- > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---