Hi! 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? Cheers, Nicolas ------------------------------------------------------------------------------ http://trac.sagemath.org/sage_trac/ticket/6343 Adds SageObject.check() generic testing framework This patch implements a .check() method in SageObject which runs systematic checks on the object. Here is a typical call: sage: ZZ.check(verbose = True) running test_an_element ... done running test_element_pickling ... done running test_not_implemented_methods ... done running test_pickling ... done In practice, o.check() runs all the methods named test_* of the object o. The test_* methods are typically implemented by abstract super classes and in particular via categories, in order to enforce standard behavior and API (test_pickling, test_an_element), or provide mathematical sanity checks (test_associativity). For consistent error reporting, the test_* methods in turn must use the new gadget sage.misc.instance_tester.InstanceTester? to actually run the tests. This patch is a prerequisite for #5891 (category framework), which uses it intensively. Some examples in the patch illustrate this, and are therefore temporarily disabled. -- 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 -~----------~----~----~----~------~----~------~--~---