Ticket #882 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[with patch] 2.8.7-alpha0: doctest failures in sets/set.py and matrix/matrix_integer_dense.pyx (due to RR->ZZ coercion patch)

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

Description

2.8.6 behavior:

sage: 2.5 in ZZ
False

2.8.7-alpha0 behavior:

sage: 2.5 in ZZ
---------------------------------------------------------------------------
<type 'exceptions.ValueError'>            Traceback (most recent call last)

/home/cwitty/pre-sage/<ipython console> in <module>()

/home/cwitty/pre-sage/parent.pyx in parent.Parent.__contains__()

/home/cwitty/pre-sage/integer_ring.pyx in integer_ring.IntegerRing_class.__call__()

/home/cwitty/pre-sage/integer.pyx in integer.Integer.__init__()

/home/cwitty/pre-sage/real_mpfr.pyx in real_mpfr.RealNumber._integer_()

<type 'exceptions.ValueError'>: Attempt to coerce non-integral RealNumber to Integer

I'm pretty sure this is the underlying cause behind several 2.8.7-alpha0 doctest failures.

I have prepared a patch for this, which I will be testing shortly.

Attachments

6928.patch Download (3.6 KB) - added by cwitty 3 years ago.

Change History

Changed 3 years ago by cwitty

Changed 3 years ago by cwitty

  • summary changed from 2.8.7-alpha0: doctest failures due to RR->ZZ coercion patch to [with patch] 2.8.7-alpha0: doctest failures due to RR->ZZ coercion patch

I have attached a patch to change RR->ZZ coercion failure from ValueError? to TypeError?. This fixes the doctest errors in sets/set.py and matrix/matrix_integer_dense.py.

Changed 3 years ago by cwitty

  • summary changed from [with patch] 2.8.7-alpha0: doctest failures due to RR->ZZ coercion patch to [with patch] 2.8.7-alpha0: doctest failures in sets/set.py and matrix/matrix_integer_dense.pyx (due to RR->ZZ coercion patch)

Changed 3 years ago by was

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