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

[bug] pytest always raises a deprecation warning #3415

Closed
devonhk opened this issue Apr 20, 2018 · 6 comments
Closed

[bug] pytest always raises a deprecation warning #3415

devonhk opened this issue Apr 20, 2018 · 6 comments
Labels
type: bug problem that needs to be addressed type: docs documentation improvement, missing or needing clarification

Comments

@devonhk
Copy link

devonhk commented Apr 20, 2018

Description
Pytest always raises the following deprecation warning:

================================================= warnings summary ==================================================
None
  pytest_funcarg__cov: declaring fixtures using "pytest_funcarg__" prefix is deprecated and scheduled to be removed in pytest 4.0.  Please remove the prefix and use the @pytest.fixture decorator instead.

-- Docs: http://doc.pytest.org/en/latest/warnings.html

Even though I'm not using the old declaration style for fixtures.

pytest version: pytest==3.5.0
python version: 3.5.2
pip-list: https://gist.github.com/pydo/b234d9f9b9e9ca8b368dc5d86a092ac7
OS distro: Ubuntu 16.04 - 4.13.0-38-generic


Repo steps

  1. Create the following test module test_file.py:
def test_foo():
    assert 1
  1. Run pytest pytest test_file.py

Expected behavior
Pytest does not display any deprecation warnings in its test results

Actual behavior
This warning is always displayed:

================================================= warnings summary ==================================================
None
  pytest_funcarg__cov: declaring fixtures using "pytest_funcarg__" prefix is deprecated and scheduled to be removed in pytest 4.0.  Please remove the prefix and use the @pytest.fixture decorator instead.

-- Docs: http://doc.pytest.org/en/latest/warnings.html
======================================= 1 passed, 1 warnings in 0.01 seconds ========================================
@pytestbot pytestbot added the type: docs documentation improvement, missing or needing clarification label Apr 20, 2018
@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #2469 (pytest deprecated_call contextmanager not always seeing warnings), #176 (pytest.raises(AssertionError) fails with cython modules), #767 (pytest.raises() doesn't always return Exception instance in py26), #1370 (Print out pytest-warnings?), and #3348 (pytest.raises should complain about unknown arguments).

@devonhk devonhk changed the title pytest always raises a deprecation warning [bug] pytest always raises a deprecation warning Apr 20, 2018
@pytestbot pytestbot added the type: bug problem that needs to be addressed label Apr 20, 2018
@blueyed
Copy link
Contributor

blueyed commented Apr 20, 2018

What plugins are you using? (i.e. paste the output from the whole pytest run, please).

@blueyed blueyed closed this as completed Apr 20, 2018
@blueyed blueyed reopened this Apr 20, 2018
@devonhk
Copy link
Author

devonhk commented Apr 20, 2018

@blueyed
Plugins: cov-2.2.1
Full pytest output:

================================================ test session starts ================================================
platform linux -- Python 3.5.2, pytest-3.5.0, py-1.5.3, pluggy-0.6.0
rootdir: /home/user/Documents/Projects/sales_tool/st, inifile:
plugins: cov-2.2.1
collected 1 item                                                                                                    

src/tests/unit/test_entities_proposal_proposal_proposalItemBL.py .                                            [100%]

================================================= warnings summary ==================================================
None
  pytest_funcarg__cov: declaring fixtures using "pytest_funcarg__" prefix is deprecated and scheduled to be removed in pytest 4.0.  Please remove the prefix and use the @pytest.fixture decorator instead.

-- Docs: http://doc.pytest.org/en/latest/warnings.html
======================================= 1 passed, 1 warnings in 0.01 seconds ========================================

@blueyed
Copy link
Contributor

blueyed commented Apr 20, 2018

@pydo
Please upgrade pytest-cov. It was fixed in pytest-dev/pytest-cov@065911e already.

@blueyed blueyed closed this as completed Apr 20, 2018
@blueyed
Copy link
Contributor

blueyed commented Apr 20, 2018

@nicoddemus
Shouldn't there be a source for the warning?
Is None supposed to be it?

@devonhk
Copy link
Author

devonhk commented Apr 20, 2018

Thanks that fixed it.

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 type: docs documentation improvement, missing or needing clarification
Projects
None yet
Development

No branches or pull requests

3 participants