Opened 6 years ago

Closed 4 years ago

#10036 closed enhancement (implemented)

Investigate using sphinx's doctest module

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

Description

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

https://gitweb.torproject.org/stem.git/commit/?id=b94f9aa28fa453ad2be69fcfc9d9882e8849aa2c

Note: See TracTickets for help on using tickets.