Skip to content
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 1 commit into from Oct 30, 2017


Copy link

@thisch 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;
@thisch thisch force-pushed the thisch:doctest_lineno branch 2 times, most recently from 25c82c5 to c3148f8 Oct 29, 2017
Show full context of doctest source in the pytest output, if the lineno of
failed example in the docstring is < 9.
@thisch thisch force-pushed the thisch:doctest_lineno branch from c3148f8 to 2f993af Oct 29, 2017
Copy link

@coveralls 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.

Copy link

@RonnyPfannschmidt 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
0 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
continuous-integration/travis-ci/pr The Travis CI build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants