[New-bugs-announce] [issue4726] doctest gets line numbers wrong due to quotes in comments

guyer report at bugs.python.org
Mon Dec 22 19:26:24 CET 2008


New submission from guyer <guyer at nist.gov>:

My text editor places a comment block at the top of each source file with 
a block of information about the author, the project, license, etc. One 
(rather pointless) line of this block looks like

 # FILE: "somefile.py"

The re in `_find_lineno()` misinterprets this line as the beginning of the 
docstring. I believe the attached patch maintains the spirit of the re, 
while avoiding this false positive.

----------
components: Tests
files: doctest_find_lineno.diff
keywords: patch
messages: 78206
nosy: guyer
severity: normal
status: open
title: doctest gets line numbers wrong due to quotes in comments
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7
Added file: http://bugs.python.org/file12428/doctest_find_lineno.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4726>
_______________________________________


More information about the New-bugs-announce mailing list