#12491: Bring three more plot3d files to 100% coverage
------------------------------+---------------------------------------------
Reporter: kcrisman | Owner: jason, was
Type: enhancement | Status: positive_review
Priority: major | Milestone: sage-5.0
Component: graphics | Keywords:
Work_issues: | Upstream: N/A
Reviewer: David Loeffler | Author: Karl-Dieter Crisman
Merged: | Dependencies:
------------------------------+---------------------------------------------
Changes (by jhpalmieri):
* status: needs_review => positive_review
Comment:
Replying to [comment:7 kcrisman]:
> What's up with the indirect stuff? I assume this is for `sage
-coverage`?
Yes, exactly. The review patch looks good to me.
By the way, is it an issue that the instances of the `_Coordinates` class
don't seem to be picklable?
{{{
sage/plot/plot3d/plot3d.py
ERROR: Please add a `TestSuite(s).run()` doctest.
SCORE sage/plot/plot3d/plot3d.py: 100% (18 of 18)
}}}
But if I add a `TestSuite` doctest, it fails: if I make this change:
{{{
#!diff
diff --git a/sage/plot/plot3d/plot3d.py b/sage/plot/plot3d/plot3d.py
--- a/sage/plot/plot3d/plot3d.py
+++ b/sage/plot/plot3d/plot3d.py
@@ -108,8 +108,9 @@ class _Coordinates(object):
sage: from sage.plot.plot3d.plot3d import
_ArbitraryCoordinates as
sage: x,y,z=var('x,y,z')
- sage: arb((x+z,y*z,z), z, (x,y))
+ sage: c=arb((x+z,y*z,z), z, (x,y)); c
Arbitrary Coordinates coordinate transform (z in terms of x,
y)
+ sage: TestSuite(c).run()
"""
import inspect
all_vars=inspect.getargspec(self.transform).args[1:]
}}}
then I get this failure:
{{{
sage -t "devel/sage-main/sage/plot/plot3d/plot3d.py"
**********************************************************************
File
"/Users/palmieri/Desktop/Sage_stuff/sage_builds/sage-5.0.beta7-gcc/devel
/sage-main/sage/plot/plot3d/plot3d.py", line 113:
sage: TestSuite(c).run()
Expected nothing
Got:
Failure in _test_pickling:
Traceback (most recent call last):
File
"/Users/palmieri/Desktop/Sage_stuff/sage_builds/sage-5.0.beta7-gcc/local/lib/python
/site-packages/sage/misc/sage_unittest.py", line 275, in run
test_method(tester = tester)
File
"/Users/palmieri/Desktop/Sage_stuff/sage_builds/sage-5.0.beta7-gcc/local/lib/python
/site-packages/sage/misc/sage_unittest.py", line 499, in _test_pickling
tester.assertEqual(loads(dumps(self._instance)), self._instance)
File
"/Users/palmieri/Desktop/Sage_stuff/sage_builds/sage-5.0.beta7-gcc/local/lib/python2.7/unittest/case.py",
line 509, in assertEqual
assertion_func(first, second, msg=msg)
File
"/Users/palmieri/Desktop/Sage_stuff/sage_builds/sage-5.0.beta7-gcc/local/lib/python2.7/unittest/case.py",
line 502, in _baseAssertEqual
raise self.failureException(msg)
AssertionError: Arbitrary Coordinates coordinate transform (z in terms
of x, y) != Arbitrary Coordinates coordinate transform (z in terms of x,
y)
------------------------------------------------------------
The following tests failed: _test_pickling
}}}
A doctest like `c == loads(dumps(c))` also fails. If this can be fixed, it
probably should be, but on another ticket (unless it's trivial to do
here).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12491#comment:8>
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 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.