Message134278
From the doctest source:
'Option directives are comments starting with "doctest:". Warning: this may give false positives for string-literals that contain the string "#doctest:". Eliminating these false positives would require actually parsing the string; but we limit them by ignoring any line containing "#doctest:" that is *followed* by a quote mark.'
This isn't a huge deal, but it's a bit annoying. Above being confusing, this is in contradiction with the doctest documentation, which states:
'Doctest directives are expressed as a special Python comment following an example’s source code'
No mention is made of this corner case where the regexp breaks.
As per the comment in the source, the patched version parses the source using the tokenize module, and runs a modified directive regex on all comment tokens to find directives. |
|
Date |
User |
Action |
Args |
2011-04-22 19:31:22 | Devin Jeanpierre | set | recipients:
+ Devin Jeanpierre |
2011-04-22 19:31:22 | Devin Jeanpierre | set | messageid: <1303500682.88.0.595944133083.issue11909@psf.upfronthosting.co.za> |
2011-04-22 19:31:22 | Devin Jeanpierre | link | issue11909 messages |
2011-04-22 19:31:21 | Devin Jeanpierre | create | |
|