Skip to content

pytest skip: short test summary info does not display actual test file #748

Description

@pytestbot

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):


Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementnew feature or API change, should be merged into features branch

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions