#14284: Sampling in unit tests
-------------------------------+--------------------------------------------
Reporter: roed | Owner: jason
Type: enhancement | Status: positive_review
Priority: major | Milestone: sage-5.9
Component: misc | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Julian Rueth
Authors: David Roe | Merged in:
Dependencies: #14285 | Stopgaps:
-------------------------------+--------------------------------------------
Comment (by nthiery):
Hi!
Sorry to jump in a bit late in the discussion; I had not noticed this
ticket before.
I definitely see and approve the point of the ticket. On the other hand, I
find the current idiom to be used in {{{_test_associativity}}} and friends
a bit heavy. What about an idiom like:
{{{
S = tester.some_elements()
for x,y,z in tester.some_elements(CartesianProduct(S,S,S)):
...
}}}
It's short, and encapsulate TestSuite's inner logic for testing strategies
(on how many elements to run the tests, whether to do tests at random or
not, ...).
This of course requires implementing:
{{{
tester.some_elements(XXX)
}}}
The default implementation could be to run XXX.some_elements(). Or iterate
through XXX, stopping if there are more than n_max elements. Or take a
sample if XXX implements sample. Or ...
What do you think? If you agree, then I would suggest doing the changes in
this ticket, in order to minimize changes and counter changes (they
probably will require some rebasing of my upcoming category patches; the
less rebasing the better :-)).
By the way: for reproducibility of test failures, I am not super
comfortable with random testing as a default; but that might be just me.
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14284#comment:9>
Sage <http://www.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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.