#6343: [with patch, needs review] Adds TestSuite(object).run() generic testing
framework
-------------------------+--------------------------------------------------
Reporter: nthiery | Owner: nthiery
Type: enhancement | Status: assigned
Priority: major | Milestone: sage-4.1
Component: doctest | Keywords: testunit
Reviewer: | Author: nthiery
Merged: |
-------------------------+--------------------------------------------------
Description changed by nthiery:
Old description:
> This patch implements TestSuite(object).run() which runs
> systematic checks on the object. Here is a typical call:
>
> sage: TestSuite(ZZ).run(verbose = True)
> running ._test_an_element() ... done
> running ._test_element_pickling() ... done
> running ._test_not_implemented_methods() ... done
> running ._test_pickling() ... done
>
> In practice, TestSuite(o).run() 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.sage_unittest.InstanceTester to actually
> run the tests.
>
> This is used by the category patches #5891 and followers
New description:
This patch implements TestSuite(object).run() which runs
systematic checks on the object. Here is a typical call:
{{{
sage: TestSuite(ZZ).run(verbose = True)
running ._test_an_element() ... done
running ._test_element_pickling() ... done
running ._test_not_implemented_methods() ... done
running ._test_pickling() ... done
}}}
In practice, TestSuite(o).run() 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.sage_unittest.InstanceTester to actually
run the tests.
This is used by the category patches #5891 and followers
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6343#comment:7>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---