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

Use inspect to properly detect generators. Fixes #2129 #2130

Merged
merged 4 commits into from
Dec 28, 2016

Conversation

malinoff
Copy link
Contributor

@malinoff malinoff commented Dec 11, 2016

  • Make sure to include one or more tests for your change;
  • Add yourself to AUTHORS;
  • Add a new entry to CHANGELOG.rst
    • Choose any open position to avoid merge conflicts with other PRs.
    • Add a link to the issue you are fixing (if any) using RST syntax.
    • The pytest team likes to have people to acknowledged in the CHANGELOG, so please add a thank note to yourself ("Thanks @user for the PR") and a link to your GitHub profile. It may sound weird thanking yourself, but otherwise a maintainer would have to do it manually before or after merging instead of just using GitHub's merge button. This makes it easier on the maintainers to merge PRs.

@malinoff
Copy link
Contributor Author

With this fix, gist (https://gist.github.com/malinoff/148507bf51ff8b9a0a947c178aa0ac3a) output is

$ python example.py
False
False
False
False
True

@malinoff
Copy link
Contributor Author

Errors do not seem to be related to my change.

Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

the technical details are well done

i'd like for someone else to have a second look at the ramifications of the asyncio import and merge

thanks 👍

@nicoddemus
Copy link
Member

Thanks @malinoff and @RonnyPfannschmidt, I will take a more detailed look at the PR and the CI errors but probably will only have time for it later in the week though.

@nicoddemus
Copy link
Member

I pushed some commits to the PR:

  • The errors were related to the new asyncio import, which in turn imports logging which breaks an acceptance test for len(list) should be summarized in most cases #8. I had to resort to copy the relevant 2-lines function to circumvent that. It is simple enough so IMHO it shouldn't be a problem.
  • Updated the CHANGELOG;
  • Moved the "compat" tests to a single module and used testdir on the tests with newer Python syntax. While I usually prefer unit-tests instead of integration tests when possible, I think it is acceptable in this case to avoid importing asyncio into pytest's process and the flake8 errors.

Thanks again to @malinoff for pursuing this. 👍

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.832% when pulling caee5ce on malinoff:fix-2129 into da40bcf on pytest-dev:master.

@nicoddemus
Copy link
Member

Hmmm now py27-trial is also breaking. Perhaps it is related to #1989?

@malinoff
Copy link
Contributor Author

@nicoddemus could you please merge this?

@nicoddemus
Copy link
Member

@malinoff I would like to take a look at the trial failures first. While they seem unrelated, I'm not sure.

Are you using pytest in development mode?

@nicoddemus
Copy link
Member

The trial failures are certainly unrelated since they are happening on master as well and this PR has been open long enough, so I'm merging this.

Thanks @malinoff for the patience! 🙇

@nicoddemus nicoddemus merged commit 718f0b0 into pytest-dev:master Dec 28, 2016
@malinoff
Copy link
Contributor Author

Yay! Thanks @nicoddemus

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