Opened 7 years ago

Closed 5 years ago

#10036 closed enhancement (implemented)

Investigate using sphinx's doctest module

Reported by: atagar Owned by: atagar
Priority: Medium Milestone:
Component: Archived/Stem Version:
Severity: Normal Keywords: testing
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Presently we're using python's doctest module in our unit tests, which covers interpretor style examples (those with a '>>>'). However, this doesn't test examples using sphinx's '::' blocks, which we use for most of our examples.

Our unit tests provide test coverage for our tutorials, but they're maintained separately from the documentation itself so they often go stale if we update tutorials.

We should investigate using sphinx's doctest plugin or tricks with the python doctest module to get test coverage of the '::' sphinx blocks. This will likely require us to ask on the python list for ideas...

Child Tickets

Change History (1)

comment:1 Changed 5 years ago by atagar

Resolution: implemented
Severity: Normal
Status: newclosed

Oops, forgot to flag this as being done. Thanks to Sambuddha our tutorial examples are in separate files, which are now tested. This addresses our main concern which was our tests falling out of sync with the docs...

Note: See TracTickets for help on using tickets.