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

Conversation

twmr
Copy link
Contributor

@twmr twmr 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;

@twmr twmr force-pushed the doctest_lineno branch 2 times, most recently from 25c82c5 to c3148f8 Compare October 29, 2017 20:04
Show full context of doctest source in the pytest output, if the lineno of
failed example in the docstring is < 9.
@coveralls
Copy link

Coverage Status

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

@RonnyPfannschmidt
Copy link
Member

failures are unrelated, thanks 👍

@RonnyPfannschmidt RonnyPfannschmidt merged commit 26019b3 into pytest-dev:master Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants