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.importorskip not working #1839

Closed
syrusakbary opened this issue Aug 22, 2016 · 1 comment
Closed

pytest.importorskip not working #1839

syrusakbary opened this issue Aug 22, 2016 · 1 comment

Comments

@syrusakbary
Copy link

syrusakbary commented Aug 22, 2016

pytest.importorskip seems to be not working.

This code that was working with pytest 2.9.2 is not working anymore in 3.0

import pytest
asyncio = pytest.importorskip("asyncio")

Receiving the following error:

____________________________________________________________________ ERROR collecting graphql/execution/tests/test_executor_asyncio.py ____________________________________________________________________
Using @pytest.skip outside a test (e.g. as a test function decorator) is not allowed. Use @pytest.mark.skip or @pytest.mark.skipif instead.

Envlist:

pytest (3.0.0)
pytest-benchmark (3.0.0)
pytest-cov (2.2.0)
pytest-django (2.9.1)
pytest-mock (0.11.0)
pytest-profiling (1.1.1)
pytest-xdist (1.13.1)
@RonnyPfannschmidt
Copy link
Member

this is a duplicate of #1822 which was fixed in #1823

it will be released with the next bugfix release

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