On Tue, Jun 23, 2009 at 10:29:34AM +0200, Franco Saliola wrote:
> > 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).

Thanks for the feedback! I agree that the syntax looks good.

But, err, guys, are you telling *me* that you want an attribute here
instead of a method? Or should this be:

        foo.test().associativity?

I also like the clean aspect of separating the test object. But one of
the main point of doing this would be to stick more closely to the
testunit framework. But then that would call for:

        foo.test().test_associativity()

which is not that nice anymore.

Some other questions:

 - what syntax do you want to run all tests?

        foo.check()

        foo.test().run()

        foo.test()   /   foo.test.associativity()

 - Do we want to have the .test object appear for every sage object?
   i.e. 1.test (William was not that happy about this)

Other concerns:

 - This adds yet another layer of complexity. The user has to learn
   that to implement foo.test.associativity, he should actually add a
   method _test_associativity in the class of foo (or some
   superclass). We want our users and developers to use and write lots
   of tests, so we have to keep it simple, s*d.

 - I just don't have the time to implement this *now* (I probably
   could do the renaming .check -> ._check and .test_bla to
   ._test_bla). Sorry, I have been advertising this feature for more
   than 3 months, and it would have been easier to reserve time for
   this earlier in the process ...

Cheers,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to