Skip to content

py.test reports IndexError/KeyError as an Failure instead of Error #2156

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

Closed
4 tasks
ycui opened this issue Dec 21, 2016 · 1 comment
Closed
4 tasks

py.test reports IndexError/KeyError as an Failure instead of Error #2156

ycui opened this issue Dec 21, 2016 · 1 comment

Comments

@ycui
Copy link

ycui commented Dec 21, 2016

  • Include a detailed description of the bug or suggestion
    py.test reports IndexError/KeyError as an Failure instead of Error, same file run by nosetest and unittest runner report as Error

  • pip list of the virtual environment you are using
    $ python2.7 -m pip list
    cffi (1.9.1)
    cryptography (1.7.1)
    enum34 (1.1.6)
    idna (2.1)
    ipaddress (1.0.17)
    paramiko (2.1.1)
    pip (8.1.2)
    py (1.4.29)
    pyasn1 (0.1.9)
    pycparser (2.17)
    pytest (2.7.2)
    setuptools (25.0.1)
    six (1.9.0)
    wheel (0.29.0)

  • pytest and operating system versions
    This is pytest version 2.7.2

  • Minimal example if possible
    http://stackoverflow.com/questions/41272327/py-test-reporting-indexerror-keyerror-as-a-failure-instead-of-error

Not sure if this is my user error, or an issue, or a design difference, pls help to clarify, thanks for your help.

@nicoddemus
Copy link
Member

Posted an answer in the stackoverflow thread, but in short the current behavior is by design and not a bug.

Worth mentioning again pytest-finer-verdicts written by @rvprasad. 😁

Closing this for now, feel free to post other questions though.

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

No branches or pull requests

2 participants