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

Add support for py.test fixtures #81

Open
2 tasks
wolever opened this issue Nov 19, 2019 · 2 comments
Open
2 tasks

Add support for py.test fixtures #81

wolever opened this issue Nov 19, 2019 · 2 comments
Labels
enhancement pr-wanted It would be great if someone wrote a PR for this!

Comments

@wolever
Copy link
Owner

wolever commented Nov 19, 2019

For example:

import pytest

@pytest.fixture
def some_fixture():
    yield "world!"

expect([
    "test_pytest_fixture('hello', 'world!')",
])

@parameterized([
    ('hello', ),
])
def test_pytest_fixture(param, some_fixture):
    missing_tests.remove("test_pytest_fixture(%r, %r)" %(param, some_fixture))

There should also be tests added for:

  • pytest.mark.usefixtures
  • combining py.test fixtures with @mock.patch decorators
@wolever wolever added bug enhancement pr-wanted It would be great if someone wrote a PR for this! and removed bug labels Nov 19, 2019
@yunuscanemre
Copy link

yunuscanemre commented Jul 23, 2021

bump 🙏

@Yingqingshan
Copy link

这个如何解决?好像会报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pr-wanted It would be great if someone wrote a PR for this!
Projects
None yet
Development

No branches or pull requests

3 participants