On 03/01/2010 04:45 PM, Ryan Hinton wrote:
As for your "documentation" solution, I think this is where we disagree. If I use tab completion and find a method hanging on a BipartiteGraph instance, I expect it to work. In other words, if it is written, documented, and tested in generic_graph.py *and inherited* in BG, I expect it to work. Having taken part in this discussion, I know to look carefully at where the method is defined and whether it includes any explicit tests of BG instances. But in general, I expect the methods defined on an object to work. (Maybe this is a bad assumption since it has failed several times for me with sage!)
Just a quick note: the TestSuite framework introduced recently provides an easy way to run a suite of tests with elements of a class or any of its subclasses. Using it exposed a number of inconsistencies in the matrix class hierarchy, for example. So maybe writing TestSuite tests for the graph methods would expose problems with the BipartiteGraph subclass. For example, I can see a TestSuite function creating a graph, copying it, and checking that the result had the same class.
See http://trac.sagemath.org/sage_trac/ticket/6936 for the matrix TestSuite ticket, and http://trac.sagemath.org/sage_trac/ticket/7989 for a TestSuite test which exposes lots of problems in the matrix subclasses for a specific function.
Jason -- 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