Fix getdoctarget to ignore comment lines

This commit is contained in:
Bruno Oliveira 2015-08-23 11:20:34 -03:00
parent 44d9365da0
commit a20c6d072d
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ def get_version_string():
fn = py.path.local(__file__).join("..", "..", "..", fn = py.path.local(__file__).join("..", "..", "..",
"_pytest", "__init__.py") "_pytest", "__init__.py")
for line in fn.readlines(): for line in fn.readlines():
if "version" in line: if "version" in line and not line.strip().startswith('#'):
return eval(line.split("=")[-1]) return eval(line.split("=")[-1])
def get_minor_version_string(): def get_minor_version_string():