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

msg in pytest.exit(msg) doesn't get printed when called in pytest hook #1210

Closed
BeyondEvil opened this issue Dec 1, 2015 · 1 comment
Closed
Labels
good first issue easy issue that is friendly to new contributor status: help wanted developers would like help from experts on this topic topic: reporting related to terminal output and user-facing messages and errors type: bug problem that needs to be addressed

Comments

@BeyondEvil
Copy link

OSX 10.10.4
pytest version 2.8.2
Python 2.7.6

In Conftest.py

import pytest
def pytest_configure(config):
    if condition not met:
        pytest.exit("oh noes")

pytest exits silently w/o printing 'msg' ("oh noes") regardless of any -s, -v, -q or -rx flags.

@markshao
Copy link
Contributor

markshao commented Dec 1, 2015

I can reproduce this in my environment , looks like the code in pytest_configure function is not executed .

@RonnyPfannschmidt RonnyPfannschmidt added type: bug problem that needs to be addressed status: help wanted developers would like help from experts on this topic topic: reporting related to terminal output and user-facing messages and errors good first issue easy issue that is friendly to new contributor labels Dec 1, 2015
doomb0t added a commit to doomb0t/pytest that referenced this issue Jun 24, 2016
doomb0t added a commit to doomb0t/pytest that referenced this issue Jun 24, 2016
doomb0t added a commit to doomb0t/pytest that referenced this issue Jun 24, 2016
doomb0t added a commit to doomb0t/pytest that referenced this issue Jun 25, 2016
tomviner pushed a commit to tomviner/pytest that referenced this issue Jun 25, 2016
tomviner pushed a commit to tomviner/pytest that referenced this issue Jun 25, 2016
tomviner pushed a commit to tomviner/pytest that referenced this issue Jul 24, 2016
tomviner pushed a commit to tomviner/pytest that referenced this issue Jul 24, 2016
tomviner pushed a commit to tomviner/pytest that referenced this issue Jul 24, 2016
tomviner pushed a commit to tomviner/pytest that referenced this issue Jul 24, 2016
tomviner added a commit to tomviner/pytest that referenced this issue Jul 24, 2016
nicoddemus added a commit that referenced this issue Jul 24, 2016
Fix #1210 display msg for early calls to exit
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 status: help wanted developers would like help from experts on this topic topic: reporting related to terminal output and user-facing messages and errors type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

3 participants