#9235: Doctest coverage for sage.categories.homset
-----------------------------+----------------------------------------------
Reporter: SimonKing | Owner: nthiery
Type: defect | Status: needs_work
Priority: minor | Milestone: sage-4.7.1
Component: categories | Keywords: doctest coverage homset
Work_issues: | Upstream: N/A
Reviewer: Niles Johnson | Author: Simon King
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Old description:
> The doctest coverage for sage.categories.homset was
> {{{
> SCORE devel/sage-main/sage/categories/homset.py: 52% (13 of 25)
> }}}
>
> My patch covers all but two methods:
>
> * get_action_c
> * coerce_map_from_c
>
> These two return (by default) None. Is there a good ''indirect'' doctest
> for these two? I am not familiar with {{{get_action}}}, and I don't know
> what {{{coerce_map_from_c}}} does, compared with {{{_coerce_map_from_}}}.
> Perhaps the reviewer can explain it to me, so that I or s/he can add the
> two missing tests?
New description:
The doctest coverage for sage.categories.homset was
{{{
SCORE devel/sage-main/sage/categories/homset.py: 52% (13 of 25)
}}}
My patch covers all but two methods:
* get_action_c
* coerce_map_from_c
These two return (by default) None. Is there a good ''indirect'' doctest
for these two? I am not familiar with {{{get_action}}}, and I don't know
what {{{coerce_map_from_c}}} does, compared with {{{_coerce_map_from_}}}.
Perhaps the reviewer can explain it to me, so that I or s/he can add the
two missing tests?
== Apply ==
1. [attachment: 9235_doctest_homset.patch]
--
Comment(by niles):
I see that issuing the deprecation warning causes some failures in
`modular/abvar/homspace.py`, because the deprecation message is printed.
A minimal example to produce the message is:
{{{
sage: J = J0(37)
sage: E = J.endomorphism_ring()
sage: x = -1*E.gens()[0]
}}}
But I don't understand any more about this, so maybe it's better not to
include the deprecation warning. One could simply include tests of the
form
{{{
sage: H = Hom(ZZ^2, ZZ^3)
sage: H.get_action_c(ZZ,operator.add,ZZ) is None
True
sage: H = Hom(ZZ^2, ZZ^3)
sage: H.coerce_map_from_c(ZZ) is None
True
}}}
without a deprecation warning.
Note that *removing* the methods `get_action_c` and `coerce_map_from_c`
causes all tests in `modular/abvar/homspace.py` to pass (of course it
should, since these don't do anything anyway). No other bit of Sage code
even caused the deprecation warning to be raised, so perhaps removing them
really is a good idea (in which case a deprecation warning would be the
first step). But maybe this should be left for another ticket -- I'll
leave it up to you at this point, Simon.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9235#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.