Opened 13 years ago

Closed 5 years ago

#547 closed enhancement (fixed)

Auto-testing for example code in documentation

Reported by: Olly Betts Owned by: Olly Betts
Priority: normal Milestone: 1.4.x
Component: Test Suite Version:
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

Where we have example code in documentation, we really want to be certain that it actually would compile (and do what it is meant to, assuming it's a large enough snippet for that to be meaningful).

So it would be great if there was a framework to achieve that.

(This is mostly Richard's idea from ticket #503).

Milestone 1.2.x, since this requires no API changes.

Change History (4)

comment:1 by Olly Betts, 11 years ago

We implemented the basics of this at the recent doc sprint for the "getting started" guide.

comment:2 by Olly Betts, 10 years ago

Milestone: 1.2.x1.3.x

comment:3 by Olly Betts, 9 years ago

Milestone: 1.3.x1.4.x

The "getting started" guide now has a decent framework for this, and almost all the code there is now tested. There is code elsewhere, but the plan is to replace much of the existing documentation with the guide, and getting more code tested doesn't need to block 1.4.0 anyway.

comment:4 by Olly Betts, 5 years ago

Resolution: fixed
Status: newclosed

I think this is essentially done now. Not every single line of example code is tested, but realistically we're unlikely to ever get to that state, and having (say) 95% of it tested is hugely better than having none of it tested.

Note: See TracTickets for help on using tickets.