Opened 14 years ago

Closed 14 years ago

#5630 closed enhancement (fixed)

[with patch, positive review] improve doctest coverage for schemes/generic/spec.py

Reported by: AlexGhitza Owned by: AlexGhitza
Priority: minor Milestone: sage-3.4.1
Component: algebraic geometry Keywords: spec doctest latex
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

The attached patch adds a _latex_() method for Spec's of rings and improves the doctest coverage of spec.py from 42% (3 of 7) to 75% (6 of 8).

The two remaining methods are currently involved in other tickets that will also take care of adding doctests: see #5629 for dimension() and #5479 for __call__()

Attachments (1)

trac_5630.patch (3.3 KB) - added by AlexGhitza 14 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 14 years ago by AlexGhitza

Summary: improve doctest coverage for schemes/generic/spec.py[with patch, needs review] improve doctest coverage for schemes/generic/spec.py

comment:2 Changed 14 years ago by AlexGhitza

Owner: changed from was to AlexGhitza

comment:3 Changed 14 years ago by AlexGhitza

Status: newassigned

comment:4 Changed 14 years ago by was

Summary: [with patch, needs review] improve doctest coverage for schemes/generic/spec.py[with patch, needs work] improve doctest coverage for schemes/generic/spec.py

This doctest fails for me on 32-bit OS X:

teragon:sage-3.4 wstein$ sage -t devel/sage/sage/schemes/generic/spec.py 
sage -t  "devel/sage/sage/schemes/generic/spec.py"          
**********************************************************************
File "/Users/wstein/build/sage-3.4/devel/sage/sage/schemes/generic/spec.py", line 116:
    sage: Spec(QQ) < 5
Expected:
    True
Got:
    False

Since the result is meaningless, you could flag it

sage:  spec(QQ) < 5   # random -- platform dependent

or instead have a test

sage: spec(QQ) == 5
False

If you fix this one issue, then this will get "positive review" from me.

Changed 14 years ago by AlexGhitza

Attachment: trac_5630.patch added

comment:5 Changed 14 years ago by AlexGhitza

Summary: [with patch, needs work] improve doctest coverage for schemes/generic/spec.py[with patch, needs review] improve doctest coverage for schemes/generic/spec.py

Ah, I had misinterpreted the existing docstring for _cmp_. I removed the offending doctest (the one with Spec(QQ) == 5 is already there) and clarified the docstring a little bit.

New patch is up replacing the old one.

comment:6 Changed 14 years ago by was

Summary: [with patch, needs review] improve doctest coverage for schemes/generic/spec.py[with patch, positive review] improve doctest coverage for schemes/generic/spec.py

comment:7 Changed 14 years ago by mabshoff

Resolution: fixed
Status: assignedclosed

Merged in Sage 3.4.1.rc0.

Cheers,

Michael

Note: See TracTickets for help on using tickets.