Ticket #12340 (closed defect: fixed)

Opened 16 months ago

Last modified 12 months ago

the optional polymake doctests are seriously misformatted so never run

Reported by: was Owned by: mvngu
Priority: minor Milestone: sage-5.1
Component: doctest coverage Keywords: sd40.5
Cc: Work issues:
Report Upstream: N/A Reviewers: Mike Hansen
Authors: Benjamin Jones Merged in: sage-5.1.beta3
Dependencies: Stopgaps:

Description

sage: search_src('polymake')

reveals many tests marked # optional: needs polymake. These will *NOT* get run by doing

sage -t -only_optional=polymake geometry/polytope.py

They should be formatted as

#optional - polymake

By the way, this test works fine without polymake is installed, because it doesn't do anything, so improve that by adding another test right after this that actually exercise the optional package.

sage: P = polymake.convex_hull([[1,0,0,0], [1,0,0,1], [1,0,1,0], [1,0,1,1],  [1,1,0,0], [1,1,0,1], [1,1,1,0], [1,1,1,1]])

Attachments

trac_12340.patch Download (8.7 KB) - added by benjaminfjones 12 months ago.
mark doctests requiring polymake correctly

Change History

comment:1 Changed 16 months ago by was

By the way, this code is from my commit 271, i.e., ancient history, before there was an infrastructure for how optional package tests worked. But it would be good to update this.

comment:2 Changed 12 months ago by benjaminfjones

I'm working on this, looks like polymake appears in geometry/polytope.py, rings/polynomial/groebner_fan.py, and rings/polynomial/multi_polynomial.pyx.

Changed 12 months ago by benjaminfjones

mark doctests requiring polymake correctly

comment:3 Changed 12 months ago by benjaminfjones

  • Status changed from new to needs_review

I could add doctests to a bunch of functions here, but I can't get the the polymake spkg to build on pretty much any platform, see #5488. But in the meantime, the attached patch corrects the optional doctests.

comment:4 Changed 12 months ago by mhansen

  • Status changed from needs_review to positive_review
  • Reviewers set to Mike Hansen
  • Authors set to Benjamin Jones

Looks good to me.

comment:5 Changed 12 months ago by mhansen

  • Keywords sd40.5 added

comment:6 Changed 12 months ago by jdemeyer

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