Ticket #196 (closed defect: fixed)
Doctests not counted by TrialTestCaseCounter
| Reported by: | mg | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 0.7.7 |
| Version: | 0.7.6 | Keywords: | patch |
| Cc: |
Description
Any doctests plugged into Trial is not counted by the regexp used by TrialTestCaseCounter. Doctests are enabled by using a __doctests__ attribute in a module processed by Trial, and it makes it output lines like there:
Doctest: viff.field ... [OK] Doctest: viff.field.GF ... [OK]
I have worked around this in my setup by adding this line to my master.cfg:
TrialTestCaseCounter._line_re = \ re.compile(r'^(?:Doctest: )?([\w\.]+) \.\.\. \[([^\]]+)\]$')
which seems to do the job and makes the 'tests' metric correct.
Change History
Note: See
TracTickets for help on using
tickets.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
applied, in [4005088841f5c5d9fb24d513bfe7a08af81b4614]. Thanks!