2009/6/18 Nicolas M. Thiery <nicolas.thi...@u-psud.fr>: > > 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). >
Of related interest, there are 8 publicly visible methods on SageObject: sage: s = SageObject() sage: s.<tab key> s.category s.db s.dump s.dumps s.rename s.reset_name s.save s.version I think I created all these, and I think I regret them. Maybe s.save is useful, though I usually use save(s, ...) since s.save only works on sage objects and not general python objects. I think nobody uses s.db(...). s.category is probably useful (?). I never use s.dump, s.dumps, s.version (which doesn't even work?), and s.rename/s.reset_name. -- William --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---