Ticket #7478 (closed enhancement: fixed)

Opened 10 months ago

Last modified 9 months ago

TestSuite improvements

Reported by: hivert Owned by: hivert
Priority: major Milestone: sage-4.3
Component: doctest Keywords: TestSuite
Cc: sage-combinat Author(s): Florent Hivert, Nicolas M. Thiéry
Report Upstream: N/A Reviewer(s): Nicolas M. Thiéry, Florent Hivert
Merged in: sage-4.3.alpha0 Work issues:

Description (last modified by nthiery) (diff)

  • 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

trac_7478_testsuite_dots-fh.patch Download (55.2 KB) - added by nthiery 10 months ago.

Change History

  Changed 10 months ago by hivert

  • owner changed from tbd to hivert

  Changed 10 months ago by nthiery

  • status changed from new to needs_review
  • description modified (diff)
  • author changed from Florent Hivert to Florent Hivert, Nicolas M. Thiéry
  • cc sage-combinat added; nthiery removed
  • summary changed from Remove "..." in the output of TestSuite. to TestSuite improvements
  • reviewer set to Nicolas M. Thiéry, Florent Hivert

  Changed 10 months ago by nthiery

  • type changed from defect to enhancement
  • component changed from misc to doctest

follow-up: ↓ 5   Changed 10 months ago by mhansen

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

in reply to: ↑ 4   Changed 10 months 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.

  Changed 10 months ago by nthiery

Updated patch fix a doctest I had missed.

follow-up: ↓ 8   Changed 10 months 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 10 months ago by nthiery

in reply to: ↑ 7   Changed 10 months 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.

  Changed 10 months ago by mhansen

  • status changed from positive_review to closed
  • resolution set to fixed
  • merged set to sage-4.3.alpha0

  Changed 9 months ago by mpatel

  • 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.