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

Only use @pytest.fixture decorator once #50

Merged
merged 1 commit into from
Feb 11, 2019

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Jun 18, 2018

This is now required in pytest >= 3.6

See pytest-dev/pytest#3518

Fixes #49

@kevin1024
Copy link
Owner

Thanks. Does this change the api at all or is it a completely internal change? Too lazy to look up what autouse does. (On the beach in Hawaii right now!)

@hroncok
Copy link
Contributor Author

hroncok commented Jun 18, 2018

Oh. I haven't noticed that the part is part of the plugin. This might actually make this autosued for everybody and be bad :(

@hroncok
Copy link
Contributor Author

hroncok commented Jun 18, 2018

lastly, and please use that with care: if you define an autouse fixture in a plugin, it will be invoked for all tests in all projects where the plugin is installed.

https://docs.pytest.org/en/latest/fixture.html

So a different fix is needed.

This is now required in pytest >= 3.6

We define our own autoused fixtue not to change the API

See pytest-dev/pytest#3518

Fixes kevin1024#49
@hroncok
Copy link
Contributor Author

hroncok commented Jun 18, 2018

Now it doesn't change the API.

@kevin1024 kevin1024 merged commit 3d9711e into kevin1024:master Feb 11, 2019
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.

2 participants