Opened 11 years ago

Closed 11 years ago

#12336 closed defect (fixed)

The optional doctests in sage/databases/symbolic_data.py are misformatted so they are never run

Reported by: William Stein Owned by: Minh Van Nguyen
Priority: minor Milestone: sage-5.0
Component: doctest coverage Keywords:
Cc: Michael Orlitzky Merged in: sage-5.0.beta4
Authors: Martin Albrecht Reviewers: Michael Orlitzky
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Jeroen Demeyer)

The format for optional tests is:

sage:   the_test   # optional - package_or_other_name

But in databases/symbolic_data.py, we find

sage: search_src('optional', 'database_symbo')
databases/symbolic_data.py:33:    sage: sd = SymbolicData(); sd # optional requires database_symbolic_data
databases/symbolic_data.py:36:    sage: sd.ZeroDim__example_1 # optional requires database_symbolic_data
databases/symbolic_data.py:39:    sage: sd.Katsura_3 # optional requires database_symbolic_data
...

Using "requires" doesn't work, though you can optional put that after the dash.

apply trac_12336_symbolic_data.patch

Attachments (2)

sage-trac_12336.patch (4.1 KB) - added by Michael Orlitzky 11 years ago.
Fix optional syntax in symbolic_data.py
trac_12336_symbolic_data.patch (8.5 KB) - added by Martin Albrecht 11 years ago.

Download all attachments as: .zip

Change History (12)

Changed 11 years ago by Michael Orlitzky

Attachment: sage-trac_12336.patch added

Fix optional syntax in symbolic_data.py

comment:1 Changed 11 years ago by Michael Orlitzky

Authors: Michael Orlitzky
Cc: Michael Orlitzky added
Status: newneeds_review

All optional doctests in symbolic_data.py:

$ sage -t -verbose -only-optional symbolic_data.py
...
31 passed and 0 failed.

Before the patch:

$ sage -t -verbose -only-optional=database_symbolic_data symbolic_data.py 
sage -t -verbose -only-optional=database_symbolic_data "devel/sage-devel/sage/databases/symbolic_data.py"
	 [0.1 s]
 
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 0.1 seconds

And after the patch,

$ sage -t -verbose -only-optional=database_symbolic_data symbolic_data.py
...
31 passed and 0 failed.

comment:2 Changed 11 years ago by Martin Albrecht

Ah, crap. I completely missed that there was a patch up already, so I prepared my own. Sorry. But to sweeten the deal: I fixed the format of the docs so that they work with sphinx and added the docs to the reference manual.

comment:3 Changed 11 years ago by William Stein

mjo: can you referee malb's patch? (or conversely -- I'm confused.)

comment:4 in reply to:  3 Changed 11 years ago by Michael Orlitzky

Replying to was:

mjo: can you referee malb's patch? (or conversely -- I'm confused.)

His is the better patch.

It's annoying for me to review documentation from home thanks to #12276 (I have to rebuild a chunk of my system or the HTML looks like hell), but I can do it tonight. I've got to build beta2 anyway.

comment:5 Changed 11 years ago by Michael Orlitzky

I know this is silly, but since the patch touches them all, can you change EXAMPLE to EXAMPLES? At least for the one with multiple examples (I prefer them to be consistent, but don't care all that much).

Other than that, the patch is fine and the new docs look great.

comment:6 Changed 11 years ago by Michael Orlitzky

Authors: Michael OrlitzkyMartin Albrecht
Reviewers: Michael Orlitzky
Status: needs_reviewneeds_work
Work issues: EXAMPLE -> EXAMPLES in headings

Changed 11 years ago by Martin Albrecht

comment:7 Changed 11 years ago by Martin Albrecht

Status: needs_workneeds_review

done :)

comment:8 Changed 11 years ago by Michael Orlitzky

Status: needs_reviewpositive_review
Work issues: EXAMPLE -> EXAMPLES in headings

Today I learned that you can start a commit message with the comment delimiter. Thanks!

comment:9 Changed 11 years ago by Jeroen Demeyer

Description: modified (diff)

I guess...

comment:10 Changed 11 years ago by Jeroen Demeyer

Merged in: sage-5.0.beta4
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.