Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7478 closed enhancement (fixed)

TestSuite improvements

Reported by: hivert Owned by: hivert
Priority: major Milestone: sage-4.3
Component: doctest coverage Keywords: TestSuite
Cc: sage-combinat Merged in: sage-4.3.alpha0
Authors: Florent Hivert, Nicolas M. Thiéry Reviewers: Nicolas M. Thiéry, Florent Hivert
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by nthiery)

  • Changes "... done" to ". . . pass" in the output of TestSuite?().run(verbose = True) to avoid unintentional matches
  • Fix the doctests accordingly.
  • Adds skip option; use it in sage/combinat/sf/jack.py and orthotriang.py
  • In case of failure, execute the following tests after printing out a traceback, and write a summary at the end
  • Only use verbose=True in the doctests when useful (category examples)

Rationale for the ...: when testing something in verbose mode the typical output of sage is:

   sage: P = Sets().example("inherits")
   sage: TestSuite(P).run(verbose=True)
   running ._test_an_element() ... done
   running ._test_element_pickling() ... done
   running ._test_not_implemented_methods() ... done
   running ._test_pickling() ... done
   running ._test_some_elements() ... done

And there is some risks that the "..." match something they should'nt I change them to ". . ."

See discussion on sage-devel

Attachments (1)

trac_7478_testsuite_dots-fh.patch (55.2 KB) - added by nthiery 8 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 8 years ago by hivert

  • Owner changed from tbd to hivert

comment:2 Changed 8 years ago by nthiery

  • Authors changed from Florent Hivert to Florent Hivert, Nicolas M. Thiéry
  • Cc sage-combinat added; nthiery removed
  • Description modified (diff)
  • Reviewers set to Nicolas M. Thiéry, Florent Hivert
  • Status changed from new to needs_review
  • Summary changed from Remove "..." in the output of TestSuite. to TestSuite improvements

comment:3 Changed 8 years ago by nthiery

  • Component changed from misc to doctest
  • Type changed from defect to enhancement

comment:4 follow-up: Changed 8 years ago by mhansen

There is a spurious "only" to "o.." change in sets_cat.py.

comment:5 in reply to: ↑ 4 Changed 8 years ago by nthiery

Replying to mhansen:

There is a spurious "only" to "o.." change in sets_cat.py.

Good spot :-)

I had already found a couple, and thought I had done a systematic search.

Fixed in the newly uploaded patch.

comment:6 Changed 8 years ago by nthiery

Updated patch fix a doctest I had missed.

comment:7 follow-up: Changed 8 years ago by hivert

There are still some minor problems (missing ``...`` in the documentation of testsuite. Aside those everything is ok for me. Nicolas can you review trac_7478_testsuite_dots-fh-review.patch on the queue. Then either me or you fold, reupload and set positive review.

...trying to ping you on irc for synchro.

Changed 8 years ago by nthiery

comment:8 in reply to: ↑ 7 Changed 8 years ago by nthiery

  • Status changed from needs_review to positive_review

Replying to hivert:

There are still some minor problems (missing ``...`` in the documentation of testsuite. Aside those everything is ok for me. Nicolas can you review trac_7478_testsuite_dots-fh-review.patch on the queue. Then either me or you fold, reupload and set positive review.

...trying to ping you on irc for synchro.

Review patch is good. Folded and uploaded. positive review.

comment:9 Changed 8 years ago by mhansen

  • Merged in set to sage-4.3.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:10 Changed 8 years ago by mpatel

  • Report Upstream set to N/A

I just "discovered" sage.misc.sage_unittest. In case it's of wider use: At #7390 there's a unittest HTML report generator that may make it into SageNB.

Note: See TracTickets for help on using tickets.