#7946: Fix TestSuite failures for schemes
--------------------------------------+--------------------------
       Reporter:  nthiery             |        Owner:  AlexGhitza
           Type:  defect              |       Status:  new
       Priority:  major               |    Milestone:  sage-6.2
      Component:  algebraic geometry  |   Resolution:
       Keywords:                      |    Merged in:
        Authors:                      |    Reviewers:
Report Upstream:  N/A                 |  Work issues:
         Branch:                      |       Commit:
   Dependencies:  #16158              |     Stopgaps:
--------------------------------------+--------------------------
Changes (by pbruin):

 * dependencies:   => #16158


Old description:

> Spec(...) does not specify its category:
>
> {{{
> sage: C = Spec(ZZ)
> sage: C.category()
> Category of sets
> sage: isinstance(C, C.category().element_class)
> False
> }}}
>
> Caught with #7921; please write patch on top of it to avoid conflicts.
>
> Here is the complete TestSuite report, which also complains about
> an_element, ...::
>
> {{{
> sage: TestSuite(Spec(ZZ)).run()
> running ._test_an_element() . . . fail
> Traceback (most recent call last):
> ...
> AssertionError: self.an_element() is not in self
> ------------------------------------------------------------
> running ._test_category() . . . fail
> Traceback (most recent call last):
> ...
> AssertionError: category of self improperly initialized
> ------------------------------------------------------------
> running ._test_elements() . . .
>   Failure in _test_category:
>   Traceback (most recent call last):
>   ...
>   AssertionError
>   ------------------------------------------------------------
>   running ._test_not_implemented_methods() . . . pass
>   running ._test_pickling() . . . fail
>   Traceback (most recent call last):
>   ...
>   RuntimeError: ...BUG in map, returned None Point on Spectrum of Integer
> Ring defined by the Principal ideal (2) of Integer Ring <type
> 'sage.categories.morphism.CallMorphism'> Call morphism:
>   ------------------------------------------------------------
>   The following tests failed: _test_category, _test_pickling
> running ._test_not_implemented_methods() . . . pass
> running ._test_pickling() . . . pass
> running ._test_some_elements() . . . fail
> Traceback (most recent call last):
> ...
> AssertionError: the object Point on Spectrum of Integer Ring defined by
> the Principal ideal (2) of Integer Ring in self.some_elements() is not in
> self
> ------------------------------------------------------------
> The following tests failed: _test_an_element, _test_category,
> _test_elements, _test_some_elements
> }}}

New description:

 Here is the complete `TestSuite` report:
 {{{
 sage: S=Spec(ZZ)
 sage: x=S.an_element()
 }}}
 {{{
 sage: TestSuite(S).run()
 Failure in _test_an_element:
 Traceback (most recent call last):
 ...
 NotImplementedError
 ------------------------------------------------------------
   Failure in _test_category:
   Traceback (most recent call last):
   ...
   AssertionError: False is not true
   ------------------------------------------------------------
   Failure in _test_pickling:
   Traceback (most recent call last):
   ...
   AssertionError: Point on Spectrum of Integer Ring defined by the
 Principal ideal (991) of Integer Ring != Point on Spectrum of Integer Ring
 defined by the Principal ideal (991) of Integer Ring
   ------------------------------------------------------------
   The following tests failed: _test_category, _test_pickling
 Failure in _test_elements
 Failure in _test_some_elements:
 Traceback (most recent call last):
 ...
 NotImplementedError
 ------------------------------------------------------------
 The following tests failed: _test_an_element, _test_elements,
 _test_some_elements
 }}}
 {{{
 sage: TestSuite(x).run()
 Failure in _test_category:
 Traceback (most recent call last):
 ...
 AssertionError: False is not true
 ------------------------------------------------------------
 Failure in _test_pickling:
 Traceback (most recent call last):
 ...
 AssertionError: Point on Spectrum of Integer Ring defined by the Principal
 ideal (991) of Integer Ring != Point on Spectrum of Integer Ring defined
 by the Principal ideal (991) of Integer Ring
 ------------------------------------------------------------
 The following tests failed: _test_category, _test_pickling
 }}}

 (Note: the `NotImplementedError` that one gets after applying #16158 is a
 different one than before.)

--

Comment:

 To show that the first part of the original ticket is fixed:
 {{{
 sage: S = Spec(ZZ)
 sage: S.category()
 Category of Schemes
 sage: isinstance(S, S.category().parent_class)
 True
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/7946#comment:7>
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to