Opened 7 years ago

Closed 7 years ago

#12336 closed defect (fixed)

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

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

Description (last modified by jdemeyer)

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 mjo 7 years ago.
Fix optional syntax in symbolic_data.py
trac_12336_symbolic_data.patch (8.5 KB) - added by malb 7 years ago.

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by mjo

Fix optional syntax in symbolic_data.py

comment:1 Changed 7 years ago by mjo

  • Authors set to Michael Orlitzky
  • Cc mjo added
  • Status changed from new to needs_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 7 years ago by malb

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 follow-up: Changed 7 years ago by was

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

comment:4 in reply to: ↑ 3 Changed 7 years ago by mjo

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 7 years ago by mjo

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 7 years ago by mjo

  • Authors changed from Michael Orlitzky to Martin Albrecht
  • Reviewers set to Michael Orlitzky
  • Status changed from needs_review to needs_work
  • Work issues set to EXAMPLE -> EXAMPLES in headings

Changed 7 years ago by malb

comment:7 Changed 7 years ago by malb

  • Status changed from needs_work to needs_review

done :)

comment:8 Changed 7 years ago by mjo

  • Status changed from needs_review to positive_review
  • Work issues EXAMPLE -> EXAMPLES in headings deleted

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

comment:9 Changed 7 years ago by jdemeyer

  • Description modified (diff)

I guess...

comment:10 Changed 7 years ago by jdemeyer

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