Ticket #884 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[with-patch] 2.8.7-alpha0: doctest failure in rings/residue_field.pyx

Reported by: cwitty Owned by: was
Priority: blocker Milestone: sage-2.8.7
Component: doctest Keywords:
Cc: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description

On sage.math, the rings/residue_field.pyx doctest fails as follows in 2.8.7:

sage -t  devel/sage-rtest/sage/rings/residue_field.pyx      **********************************************************************
File "residue_field.pyx", line 364:
    sage: b*c^2
Exception raised:
    Traceback (most recent call last):
      File "/home/cwitty/pre-sage/local/lib/python2.5/doctest.py", line 1212, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__.example_15[8]>", line 1, in <module>
        b*c**Integer(2)###line 364:
    sage: b*c^2
      File "element.pyx", line 1463, in element.RingElement.__pow__
      File "element.pyx", line 2777, in element.generic_power_c
      File "element.pyx", line 1376, in element.RingElement.__mul__
      File "coerce.pxi", line 126, in element._mul_c
    RuntimeError
**********************************************************************
File "residue_field.pyx", line 221:
    sage: k.coerce_map_from(OK)(OK(a)^7)
Exception raised:
    Traceback (most recent call last):
      File "/home/cwitty/pre-sage/local/lib/python2.5/doctest.py", line 1212, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__.example_9[4]>", line 1, in <module>
        k.coerce_map_from(OK)(OK(a)**Integer(7))###line 221:
    sage: k.coerce_map_from(OK)(OK(a)^7)
      File "element.pyx", line 1463, in element.RingElement.__pow__
      File "element.pyx", line 2782, in element.generic_power_c
      File "element.pyx", line 1376, in element.RingElement.__mul__
      File "coerce.pxi", line 126, in element._mul_c
    RuntimeError
**********************************************************************
2 items had failures:
   1 of  10 in __main__.example_15
   1 of   5 in __main__.example_9
***Test Failed*** 2 failures.
For whitespace errors, see the file .doctest_residue_field.pyxException exceptions.AttributeError: "'AbsoluteOrder' object has no attribute 'polynomial_ntl'" in 'number_field_element.NumberFieldElement_absolute._parent_poly_c_' ignored
ZZX: division by zero
Exception exceptions.AttributeError: "'AbsoluteOrder' object has no attribute 'polynomial_ntl'" in 'number_field_element.NumberFieldElement_absolute._parent_poly_c_' ignored
ZZX: division by zero

Attachments

trac884.patch Download (2.9 KB) - added by roed 3 years ago.
Uncommented region that shouldn't have been commented out.

Change History

Changed 3 years ago by roed

  • owner changed from failure to roed
  • status changed from new to assigned

Changed 3 years ago by roed

Uncommented region that shouldn't have been commented out.

Changed 3 years ago by roed

  • summary changed from 2.8.7-alpha0: doctest failure in rings/residue_field.pyx to [with-patch] 2.8.7-alpha0: doctest failure in rings/residue_field.pyx

Changed 3 years ago by was

I reject this patch. That code was commented out for a reason. It is conceptually completely wrong to have such methods on an order -- the order can't be defined by a single poly in general, etc.

Changed 3 years ago by was

Actually David Roes' code is right and his example just exposes a bug in my code.

Changed 3 years ago by was

  • owner changed from roed to was*
  • status changed from assigned to new

I'm working on this...

Changed 3 years ago by was

  • owner changed from was* to was
  • status changed from new to assigned

Changed 3 years ago by was

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.