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.mark.skipif marker does not display / have correct source information #665

Closed
pytestbot opened this issue Jan 23, 2015 · 1 comment
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Daniel Hahler (BitBucket: blueyed, GitHub: blueyed)


When using the pytest.mark.skipif marker, the test summary does not report the location of the marker / test, but where pytest.skip() is being called internally:

======================================================================== short test summary info ========================================================================
SKIP [2] /path/to/pytest/_pytest/skipping.py:140: Django < 1.7 doesn't have migrations

This is the code that calls it:

@pytest.mark.tryfirst
def pytest_runtest_setup(item):
    evalskip = MarkEvaluator(item, 'skipif')
    if evalskip.istrue():
        pytest.skip(evalskip.getexplanation())
    item._evalxfail = MarkEvaluator(item, 'xfail')
    check_xfail_no_run(item)

@The-Compiler
Copy link
Member

This has been fixed in #789.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

2 participants