Skip to content

Fix off-by-one error with lines from request.node.warn#1806

Merged
nicoddemus merged 1 commit intopytest-dev:masterfrom
blueyed:fix-off-by-one-error-with-warnings
Aug 15, 2016
Merged

Fix off-by-one error with lines from request.node.warn#1806
nicoddemus merged 1 commit intopytest-dev:masterfrom
blueyed:fix-off-by-one-error-with-warnings

Conversation

@blueyed
Copy link
Copy Markdown
Contributor

@blueyed blueyed commented Aug 11, 2016

The line numbers in node.location seem to be zero-based?!

@blueyed blueyed added the type: bug problem that needs to be addressed label Aug 11, 2016
@coveralls
Copy link
Copy Markdown

coveralls commented Aug 11, 2016

Coverage Status

Coverage remained the same at 92.324% when pulling dc2b330 on blueyed:fix-off-by-one-error-with-warnings into 34925a3 on pytest-dev:master.

@nicoddemus
Copy link
Copy Markdown
Member

Thanks @blueyed!

Would you mind adding a quick CHANGELOG entry?

The line numbers in `node.location` seem to be zero-based?!
@blueyed blueyed force-pushed the fix-off-by-one-error-with-warnings branch from dc2b330 to 16cb5d0 Compare August 14, 2016 20:10
@blueyed
Copy link
Copy Markdown
Contributor Author

blueyed commented Aug 14, 2016

Added a changelog entry.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 92.324% when pulling 16cb5d0 on blueyed:fix-off-by-one-error-with-warnings into 34925a3 on pytest-dev:master.

@nicoddemus nicoddemus merged commit ca59579 into pytest-dev:master Aug 15, 2016
@nicoddemus
Copy link
Copy Markdown
Member

Thanks @blueyed! 👍

@blueyed blueyed deleted the fix-off-by-one-error-with-warnings branch August 15, 2016 22:11
@blueyed
Copy link
Copy Markdown
Contributor Author

blueyed commented Sep 15, 2016

The location being zero-based is a bit weird, isn't it - and I've noticed it being used wrong several times already (just with fschulze/pytest-pdb#2 now).

Can this be addressed somehow, e.g. by providing some other interface, that is not zero-based?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug problem that needs to be addressed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants