New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix context output handling for doctests #2882

Merged
merged 1 commit into from Oct 30, 2017

Conversation

Projects
None yet
4 participants
@thisch
Contributor

thisch commented Oct 29, 2017

If the linenumber of a failing doctest is < 9, the failure/error report is wrong.

Thanks for submitting a PR, your contribution is really appreciated!

Here's a quick checklist that should be present in PRs:

  • Add a new news fragment into the changelog folder
    • name it $issue_id.$type for example (588.bug)
    • if you don't have an issue_id change it to the pr id after creating the pr
    • ensure type is one of removal, feature, bugfix, vendor, doc or trivial
    • Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."
  • Target: for bugfix, vendor, doc or trivial fixes, target master; for removals or features target features;
  • Make sure to include reasonable tests for your change if necessary

Unless your change is a trivial or a documentation fix (e.g., a typo or reword of a small section) please:

  • Add yourself to AUTHORS, in alphabetical order;
Fix context output handling for doctests
Show full context of doctest source in the pytest output, if the lineno of
failed example in the docstring is < 9.
@coveralls

This comment has been minimized.

coveralls commented Oct 29, 2017

Coverage Status

Coverage remained the same at 92.244% when pulling 2f993af on thisch:doctest_lineno into 111d640 on pytest-dev:master.

@RonnyPfannschmidt

This comment has been minimized.

Member

RonnyPfannschmidt commented Oct 30, 2017

failures are unrelated, thanks 👍

@RonnyPfannschmidt RonnyPfannschmidt merged commit 26019b3 into pytest-dev:master Oct 30, 2017

0 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment