Ticket #196 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

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

comment:1 Changed 4 years ago by warner

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from undecided to 0.7.7
Note: See TracTickets for help on using tickets.