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

Add warning for assertions on tuples #1562 #1675

Merged
merged 3 commits into from
Jun 26, 2016
Merged

Add warning for assertions on tuples #1562 #1675

merged 3 commits into from
Jun 26, 2016

Conversation

kvas-it
Copy link
Member

@kvas-it kvas-it commented Jun 25, 2016

This PR adds a warning for assertions on tuples. The warning is issued by the assertion rewriter, as suggested by @RonnyPfannschmidt, so it will only be shown if the asserts are being rewritten (which is the default in most cases).

Checklist:

  • Target: for bug or doc fixes, target master; for new features, target features
  • Make sure to include one or more tests for your change
  • Add yourself to AUTHORS
  • Add a new entry to the CHANGELOG (choose any open position to avoid merge conflicts with other PRs)

@coveralls
Copy link

coveralls commented Jun 25, 2016

Coverage Status

Coverage increased (+0.007%) to 92.435% when pulling 0db4ae1 on kvas-it:issue-1562 into 68bed00 on pytest-dev:features.

@The-Compiler
Copy link
Member

Could you add a test to show something like this does not show the warning?

tpl = ('foo', 'bar')
assert tpl

@coveralls
Copy link

coveralls commented Jun 26, 2016

Coverage Status

Coverage increased (+0.007%) to 92.435% when pulling 6d4cee2 on kvas-it:issue-1562 into 68bed00 on pytest-dev:features.

@The-Compiler
Copy link
Member

LGTM, but I'd welcome a second pair of eyes by someone who's more familiar with that code.

@nicoddemus nicoddemus merged commit 5891061 into pytest-dev:features Jun 26, 2016
@nicoddemus
Copy link
Member

Thanks @kvas-it! 😄

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