On Mon, 31 Oct 2016, Jakob Kroeker wrote:
So you have a mind of a tester? That's good to know.
Well, my "trivialcase-tester" is just those few lines of code. But as you
can see from https://trac.sagemath.org/ticket/21741 , it found quite many
error from graphs. In matrices I did not found that many errors, but I
only tested integer matrices.
Should have a list of corner cases? I don't know if that would be easy to
do or not, something like modulename._cornercases() or so.
In general I think it would be good to have a random testing framework
together with a testbot in sage.
Yes, could be useful.
Maybe you are also interested in the slides from my presentation about bug
hunting and bug preventing
on
https://wiki.sagemath.org/days66
Good slides.
I would also add a crosstesting several functions with known identity. For
example
len(list(Posets(4))) == len([g for g in digraphs(4) if g.is_directed_acyclic()
and g.is_transitively_reduced()])
(I.e. a poset can be seen as just a special case for directed graph.)
or
Posets.RandomPoset(10, 0.1).order_ideals_lattice().is_modular()
(Every order ideal lattice is a distributive lattice and every
distributive lattice is modular.)
etc.
--
Jori Mäntysalo