Skip to content

Respect PYTEST_DONT_REWRITE for plugins too. #3025

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

Merged
merged 3 commits into from
Dec 13, 2017

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 13, 2017

See #2995.


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.bugfix)
    • 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;
    [already there]

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0008%) to 92.748% when pulling c8e7d1a on anntzer:dont-rewrite-plugin into 5c6d773 on pytest-dev:master.

if name not in self._rewritten_names:
self._warn_already_imported(name)
already_imported = (
(set(names) & set(sys.modules)) - set(self._rewritten_names))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the python guide on sets proposes to write this as something more like

set(names).intersection(sys.modules).difference(self._rewritten_names) it would be nice to use that for the cleanup

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot @anntzer!

@nicoddemus
Copy link
Member

(Note to maintainers: we have to remember to manually close the issue manually)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0008%) to 92.748% when pulling 45e7734 on anntzer:dont-rewrite-plugin into 5c6d773 on pytest-dev:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 92.755% when pulling 45e7734 on anntzer:dont-rewrite-plugin into 5c6d773 on pytest-dev:master.

@RonnyPfannschmidt RonnyPfannschmidt merged commit 506c9c9 into pytest-dev:master Dec 13, 2017
@anntzer anntzer deleted the dont-rewrite-plugin branch December 13, 2017 16:45
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.

4 participants