Opened 10 years ago

Last modified 6 years ago

#13885 needs_info defect

Fix optional magma tests

Reported by: robertwb Owned by: was
Priority: major Milestone: sage-7.4
Component: interfaces: optional Keywords: interface, pexpect, doctesting, magma
Cc: vdelecroix, slelievre Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

There are, once again, a huge number of failures.

Change History (11)

comment:1 Changed 10 years ago by robertwb

So this doesn't happen again, re-enable these via #13540.

egrep -l -r 'optional.*magma' devel/sage/sage | egrep '\.pyx?' | xargs ./sage -tp 10 --only-optional=magma
[...]
	sage -t --only-optional=magma devel/sage/sage/rings/number_field/number_field_element.pyx # 2 doctests failed
	sage -t --only-optional=magma devel/sage/sage/rings/polynomial/multi_polynomial_sequence.py # 1 doctests failed
	sage -t --only-optional=magma devel/sage/sage/rings/polynomial/multi_polynomial_ideal.py # 1 doctests failed
	sage -t --only-optional=magma devel/sage/sage/rings/number_field/number_field.py # 4 doctests failed
	sage -t --only-optional=magma devel/sage/sage/coding/linear_code.py # 1 doctests failed
	sage -t --only-optional=magma devel/sage/sage/rings/polynomial/pbori.pyx # 3 doctests failed
	sage -t --only-optional=magma devel/sage/sage/crypto/mq/mpolynomialsystem.py # 1 doctests failed
	sage -t --only-optional=magma devel/sage/sage/algebras/quatalg/quaternion_algebra.py # 2 doctests failed
	sage -t --only-optional=magma devel/sage/sage/rings/polynomial/term_order.py # 1 doctests failed
	sage -t --only-optional=magma devel/sage/sage/rings/polynomial/multi_polynomial_ring_generic.pyx # 5 doctests failed
	sage -t --only-optional=magma devel/sage/sage/schemes/plane_conics/con_field.py # 14 doctests failed
	sage -t --only-optional=magma devel/sage/sage/rings/integer_ring.pyx # 1 doctests failed
	sage -t --only-optional=magma devel/sage/sage/interfaces/magma.py # 20 doctests failed
	sage -t --only-optional=magma devel/sage/sage/schemes/plane_conics/con_number_field.py # 1 doctests failed

comment:2 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:3 Changed 9 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:4 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:5 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:6 Changed 7 years ago by jdemeyer

  • Component changed from interfaces to interfaces: optional

comment:7 Changed 6 years ago by vdelecroix

  • Cc vdelecroix added
  • Milestone changed from sage-6.4 to sage-7.2

comment:8 Changed 6 years ago by mmasdeu

I think this is more like a problem with the testing framework. Here is a sample block that fails the test:

sage: C = codes.HammingCode(3,GF(2))
sage: Cm = magma(C)                 # optional - magma, indirect doctest
sage: Cm.MinimumWeight()            # optional - magma
3

The problem with this (and I suspect most of the others) is that when the --only-optional=magma flag prevents the first line in the block above to get executed, and thus C remains undefined and causes a failure in the second line.

I think that having to write the # optional - magma thing in each line of a block is quite awful. It would be better that the --only-optional=magma flag ran (in full) those blocks containing at least one # optional - magma line.

I don't know how to do this myself, though...

comment:9 follow-up: Changed 6 years ago by vdelecroix

The proper way to run magma doctest is with sage -t -optional=magma,sage. The optional sage applies to line without # optional.

comment:10 in reply to: ↑ 9 Changed 6 years ago by leif

  • Keywords interface pexpect doctesting added
  • Milestone changed from sage-7.2 to sage-7.4
  • Status changed from new to needs_info

Replying to vdelecroix:

The proper way to run magma doctest is with sage -t -optional=magma,sage. The optional sage applies to line without # optional.

Is this documented well?


Is there still a problem, or can we close this ticket? (I think I've seen some more recent one regarding the Magma interface, but I'm not sure.)

comment:11 Changed 6 years ago by slelievre

  • Cc slelievre added
  • Keywords magma added
  • Summary changed from Fix optional magma tests. to Fix optional magma tests

Such more recent tickets might include

  • #16322 Magma doctest failures
  • #17235 magma failing tests
  • #18558 Test all installed optional packages by default
  • #20182 Automatic doctest for external softwares
  • #20388 Fix the Magma interface to work with remote installations
  • #20816 pep8 in magma interface

See also trac queries

I can't answer @leif's questions, but someone should.

Note: See TracTickets for help on using tickets.