Opened 11 years ago

Closed 11 years ago

#12154 closed defect (duplicate)

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

Reported by: Marco Streng Owned by: William Stein
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 Marco Streng)

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 Marco Streng 11 years ago.

Download all attachments as: .zip

Change History (9)

comment:2 Changed 11 years ago by Marco Streng

I'm writing a patch.

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

comment:3 Changed 11 years ago by Marco Streng

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 11 years ago by Marco Streng

Attachment: 12154-magma-doctest.patch added

comment:4 Changed 11 years ago by Marco Streng

Authors: Marco Streng
Keywords: magma interface doctest rational relative number field added
Status: newneeds_review
Work issues: change doctests only

comment:5 Changed 11 years ago by Marco Streng

Description: modified (diff)

comment:6 Changed 11 years ago by Marco Streng

Status: needs_reviewneeds_work

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

comment:7 Changed 11 years ago by Marco Streng

Authors: Marco Streng
Description: modified (diff)
Milestone: sage-5.0sage-duplicate/invalid/wontfix
Reviewers: Marco Streng
Status: needs_workpositive_review

comment:8 Changed 11 years ago by Jeroen Demeyer

Resolution: duplicate
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.