Opened 9 years ago

Closed 4 years ago

#12721 closed defect (invalid)

Make doctests pass when run in a random order

Reported by: roed Owned by: roed
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: doctest framework Keywords:
Cc: tscrim Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #12415 Stopgaps:

Description

Doctests should succeed even if the tests in a given file are run in a different order, as long as the doctests in each block get run consecutively. But there are various points in the Sage library where doctests depend on the order they're run in, often masking bugs. It would be great if someone would systematically try to make doctests for all the files in Sage pass in this mode.

A good start would be to add a way to rerun doctests in a given order after a doctest fails.

Change History (8)

comment:1 Changed 9 years ago by roed

See #9461

comment:2 Changed 8 years ago by kini

  • Summary changed from Make doctetests pass when run in a random order to Make doctests pass when run in a random order

Would it be possible to make the doctester reset state between individual docstrings? That seems like the "correct" way to do it, but Python is such a stateful language that I'm not sure how possible that even is.

comment:3 Changed 8 years ago by roed

  • Component changed from doctest to doctest framework
  • Owner changed from mvngu to roed

comment:4 Changed 8 years ago by jdemeyer

  • Milestone changed from sage-5.9 to sage-wishlist

Moving to "wishlist" as I don't think it's realistic that it will be fixed.

comment:5 Changed 4 years ago by jmantysalo

  • Authors set to tscrim
  • Milestone changed from sage-wishlist to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

I think this is a duplicate of #9461. Travis, click to positive review if you agree.

comment:6 Changed 4 years ago by jmantysalo

  • Authors tscrim deleted
  • Cc tscrim added

comment:7 Changed 4 years ago by tscrim

  • Status changed from needs_review to positive_review

Concur.

comment:8 Changed 4 years ago by vbraun

  • Resolution set to invalid
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.