Fix getdoctarget to ignore comment lines
This commit is contained in:
parent
44d9365da0
commit
a20c6d072d
|
@ -6,7 +6,7 @@ def get_version_string():
|
|||
fn = py.path.local(__file__).join("..", "..", "..",
|
||||
"_pytest", "__init__.py")
|
||||
for line in fn.readlines():
|
||||
if "version" in line:
|
||||
if "version" in line and not line.strip().startswith('#'):
|
||||
return eval(line.split("=")[-1])
|
||||
|
||||
def get_minor_version_string():
|
||||
|
|
Loading…
Reference in New Issue