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

Fix: Avoid warning on latest Pytest versions #97

Conversation

JoseKilo
Copy link
Contributor

Pytest added a deprecation warning to signal fixtures being called
directly as functions.

Ref: pytest-dev/pytest#3661
Ref: https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly

Pytest added a deprecation warning to signal fixtures being called
directly as functions.

Ref: pytest-dev/pytest#3661
Ref: https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly
tox.ini Outdated
@@ -4,7 +4,7 @@ minversion = 2.5.0

[testenv]
extras = testing
commands = coverage run -m pytest {posargs}
commands = coverage run -m pytest -W error {posargs}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to add this to pytest.ini instead:

[pytest]
filterwarnings = error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, there is some config in setup.cfg already, I've moved it there.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @JoseKilo!

@dbuse
Copy link
Contributor

dbuse commented Oct 2, 2018

Anything blocking this from merging? Would be really nice to get this released!

@Tinche
Copy link
Member

Tinche commented Oct 2, 2018

Thanks!

@Tinche Tinche merged commit 923fe9a into pytest-dev:master Oct 2, 2018
@JoseKilo JoseKilo deleted the fix/pytest-warning-calling-fixture-as-function branch March 22, 2019 14:30
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

Successfully merging this pull request may close these issues.

4 participants