Opened 7 years ago

Closed 7 years ago

#12749 closed enhancement (fixed)

Raise algebras/free_algebra.py coverage to 100%

Reported by: JStarx Owned by: mvngu
Priority: trivial Milestone: sage-5.0
Component: doctest coverage Keywords: FreeAlgebra, doctest
Cc: Merged in: sage-5.0.beta12
Authors: Jim Stark Reviewers: David Loeffler
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

The attached patch adds a doctest to _coerce_map_from_, which was the only function missing one.

Attachments (1)

trac12749.patch (1.9 KB) - added by JStarx 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by JStarx

  • Status changed from new to needs_review

comment:2 Changed 7 years ago by JStarx

  • Priority changed from major to trivial

comment:3 Changed 7 years ago by davidloeffler

  • Status changed from needs_review to needs_work
  • Work issues set to correct false statement

In the list of things coercing into a free algebra, you have

        398	        - Polynomial rings in the same variables over a base with a coercion 
 	399	          map into self.base_ring() 

This is false: a polynomial ring (in which the variables commute) does not, and should not, coerce into a free algebra (in which they don't). Did you mean "free algebras in the same variables..."?

sage: F = FreeAlgebra(ZZ, 3, 'x,y,z')
sage: G = PolynomialRing(ZZ, 3, 'x,y,z')
sage: F.has_coerce_map_from(G)
False

Changed 7 years ago by JStarx

comment:4 Changed 7 years ago by JStarx

  • Status changed from needs_work to needs_review
  • Work issues correct false statement deleted

I just copied what was in the comments into the docstring, but you're right it's incorrect. I've fixed the docstring and the comments now.

comment:5 Changed 7 years ago by davidloeffler

  • Reviewers set to David Loeffler
  • Status changed from needs_review to positive_review

comment:6 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.0.beta12
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.