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

pytest.raises should complain about unknown arguments #3348

Closed
nicoddemus opened this issue Mar 27, 2018 · 3 comments
Closed

pytest.raises should complain about unknown arguments #3348

nicoddemus opened this issue Mar 27, 2018 · 3 comments
Labels
good first issue easy issue that is friendly to new contributor type: bug problem that needs to be addressed

Comments

@nicoddemus
Copy link
Member

nicoddemus commented Mar 27, 2018

The example below passes without any complaints:

import pytest
def test():
    with pytest.raises(ValueError, unknown='foo'):
        raise ValueError

It should raise a TypeError because of the unknown parameter.

Follow up of #258

@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #1411 (Pytest stops), #238 (Introduce "ids" argument to pytest.fixture), #176 (pytest.raises(AssertionError) fails with cython modules), #3280 (pytest uses deprecated convert argument in attr's attrib), and #1602 (pytest.print()).

@brianmaissy
Copy link
Contributor

@nicoddemus @RonnyPfannschmidt should this be closed?

@RonnyPfannschmidt
Copy link
Member

yes, thanks for triaging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue easy issue that is friendly to new contributor type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

4 participants