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

nicoddemus opened this Issue Mar 27, 2018 · 3 comments


None yet
4 participants

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


This comment has been minimized.

pytestbot commented Mar 27, 2018 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()).


This comment has been minimized.


brianmaissy commented Apr 2, 2018

@nicoddemus @RonnyPfannschmidt should this be closed?


This comment has been minimized.


RonnyPfannschmidt commented Apr 2, 2018

yes, thanks for triaging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment