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

Support fixtures and pytest.mark.parametrize with gen_test #5428

Closed
jrbourbeau opened this issue Oct 14, 2021 · 0 comments · Fixed by #5532
Closed

Support fixtures and pytest.mark.parametrize with gen_test #5428

jrbourbeau opened this issue Oct 14, 2021 · 0 comments · Fixed by #5532
Labels
good second issue Clearly described, educational, but less trivial than "good first issue".

Comments

@jrbourbeau
Copy link
Member

jrbourbeau commented Oct 14, 2021

In #4958, @gjoseph92 added pytest fixture and parametrization support to our distributed.utils_test.gen_cluster decorator. We should do something similar for distributed.utils_test.gen_test

The goal would be to support use cases like

@pytest.mark.parametrize("foo", [True])
@gen_test()
async def test_gen_test_parametrized(foo):
    assert foo is True

which currently fail with

______________________________________ ERROR collecting distributed/tests/test_utils.py _______________________________________
In test_func: function uses no argument 'foo'
=================================================== short test summary info ===================================================
ERROR distributed/tests/test_utils.py
@fjetter fjetter added the good first issue Clearly described and easy to accomplish. Good for beginners to the project. label Oct 20, 2021
@jrbourbeau jrbourbeau added good second issue Clearly described, educational, but less trivial than "good first issue". and removed good first issue Clearly described and easy to accomplish. Good for beginners to the project. labels Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good second issue Clearly described, educational, but less trivial than "good first issue".
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants