On Jan 29, 2010, at 9:27 PM, Dima Pasechnik wrote:

William,
I think TESTS:: would be a good idea!
Having an optional part TESTS:: where one can put more or less any
Sage code; if TESTS:: is present,
EXAMPLES:: is ignored, and otherwise EXAMPLES:: play the role of
TESTS::

We already use TESTS blocks. Both should be tested if both exist.

Indeed, without this it is impossible to really test, say, a function
that
produces a matrix that is only known up to (unknown) permutations of
rows and columns.
An example of a test that is basically not possible to make
consistently, is
values()
sage/groups/class_function.py
(this function basically returns such a matrix, namely a character
table of a group, for which the
order of conj. classes etc is a priori not known)

The thing to do here is something like

sage: M = x.values(); M # random permutation
[your matrix here]

then demonstrate that M has the right properties (not sure what they are in your case, but there should be something you can do that tests correct matrices from incorrect ones, and as well as making good tests this kind of thing is mathematically instructive as well).

- Robert

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to