Opened 9 years ago

Closed 9 years ago

#12154 closed defect (duplicate)

broken doctests in magma.py for integers in QQ and conversion of number field elements

Reported by: mstreng Owned by: was
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: interfaces Keywords: magma interface, doctest, rational, relative number field
Cc: Merged in:
Authors: Reviewers: Marco Streng
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by mstreng)

A later patch at #12006 does everything this patch does, and more. Now that ticket is closed, so this one can be closed too.

In 4.7.2, I get

        sage -t -only-optional=magma devel/sage/sage/schemes/elliptic_curves/ell_generic.py # 1 doctests failed
        sage -t -only-optional=magma devel/sage/sage/schemes/plane_conics/con_field.py # 1 doctests failed
        sage -t -only-optional=magma devel/sage/sage/interfaces/magma.py # 11 doctests failed
        sage -t -only-optional=magma devel/sage/sage/rings/polynomial/multi_polynomial.pyx # 1 doctests failed

Most of these are because 1 in QQ is now converted to Magma as "1/1" instead of "1". The other one is a simple Sage error introduced in #11580 (x is redefined as a variable in a multivariate polynomial ring and then used again as if this never happened).

Attachments (1)

12154-magma-doctest.patch (5.5 KB) - added by mstreng 9 years ago.

Download all attachments as: .zip

Change History (9)

comment:2 Changed 9 years ago by mstreng

I'm writing a patch.

Apparently some breaking of magma doctests went unnoticed in both #6329 and #11580.

comment:3 Changed 9 years ago by mstreng

Another cause of failures is conversion via _repr_, which is the default, but is quite unstable, as variable names are sometimes already initialized in Magma, so I will remove that from relative number field elements.

Changed 9 years ago by mstreng

comment:4 Changed 9 years ago by mstreng

  • Authors set to Marco Streng
  • Keywords magma interface doctest rational relative number field added
  • Status changed from new to needs_review
  • Work issues change doctests only deleted

comment:5 Changed 9 years ago by mstreng

  • Description modified (diff)

comment:6 Changed 9 years ago by mstreng

  • Status changed from needs_review to needs_work

The new _magma_init_ in number_field_element.pyx gives me "1 out of 1 hunks FAILED"

comment:7 Changed 9 years ago by mstreng

  • Authors Marco Streng deleted
  • Description modified (diff)
  • Milestone changed from sage-5.0 to sage-duplicate/invalid/wontfix
  • Reviewers set to Marco Streng
  • Status changed from needs_work to positive_review

comment:8 Changed 9 years ago by jdemeyer

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.