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 skip: short test summary info does not display actual test file #748

Closed
pytestbot opened this issue May 20, 2015 · 2 comments
Closed
Labels
type: enhancement new feature or API change, should be merged into features branch

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Thomas De Schampheleire (BitBucket: patrickdepinguin, GitHub: patrickdepinguin)


In Kallithea, we have test code such as::

    if not ldap_lib_installed:
        raise SkipTest('skipping due to missing ldap lib')

where the test is derived from unittest.TestCase, and SkipTest is imported from nose.plugins.skip.

The 'short test summary info' provided by pytest displays::

SKIP [3] /..../local/lib/python2.7/site-packages/_pytest/unittest.py:114: skipping due to missing ldap lib

This line refers to unittest.py (handling the skip), rather than the actual test file that causes the skip.

What I expect is output like::

SKIP [3] /..../kallithea/kallithea/tests/functional/test_admin_auth_settings.py:27: skipping due to missing ldap lib

Related issues were reported a long time ago (they should probably be fixed/closed together with this one):


@pytestbot
Copy link
Contributor Author

Original comment by Bruno Oliveira (BitBucket: nicoddemus, GitHub: nicoddemus):


Is using pytest.skip('skipping due to missing ldap lib') instead of raise SkipTest(...) an option? pytest has its own skip functionality, and I'm not sure we need to support this for nose out of the box.

@pytestbot
Copy link
Contributor Author

Original comment by Bruno Oliveira (BitBucket: nicoddemus, GitHub: nicoddemus):


Sorry, haven't seen #114, so in fact that does not work as I said. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

1 participant