Hi Volker,
On Friday, May 9, 2014 5:57:09 PM UTC+2, Peter Bruin wrote:
I just opened a ticket http://trac.sagemath.org/ticket/16311, but I
thought I'd also send a message to sage-devel to advertise the fact that we
can't rely on that doctest to ensure backwards compatibility of our
unpickling procedures, and to ask about ideas to remedy this.
If it is a parent/element then you could do TestSuite(loads(x)).run()
That is in fact an existing doctest, but marked not tested, in
sage_object.pyx:
If you want to find *lots* of little issues in Sage then try the
following::
sage: print x;
sage.structure.sage_object.unpickle_all(run_test_suite = True) # todo: not
tested
This runs :class:`TestSuite` tests on all objects in the Sage
pickle
jar. Some of those objects seem to unpickle properly, but do
not
pass the tests because their internal data structure is
messed
up. In most cases though it is just that their source file
misses
a TestSuite call, and therefore some misfeatures went
unnoticed
(typically Parents not implementing the ``an_element``
method).
The comment that their internal data structure is messed up now seems to
apply to a _lot_ of pickles. I think that before enabling the above
doctest (for which we would undoubtedly have to do a huge amount of work to
make it pass) we should implement some more basic tests, like verifying
that taking the string representation of the unpickled object raises no
errors.
Peter
--
You received this message because you are subscribed to the Google Groups
sage-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.