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

Pass DDF models to pytest parametrize decorator #149

Open
JakNowy opened this issue Jul 21, 2022 · 1 comment
Open

Pass DDF models to pytest parametrize decorator #149

JakNowy opened this issue Jul 21, 2022 · 1 comment

Comments

@JakNowy
Copy link

JakNowy commented Jul 21, 2022

It would be awesome if we could have something like:

@pytest.mark.parametrize('db_object', [G(Model1), G(Model2)])
    def test_foo(db_object):
        ...

Looks like there is some issue with the db init, would it be possible to make it work?

@JakNowy JakNowy changed the title Pass dynamic fixtures to pytest parametrize decorator Pass DDF models to pytest parametrize decorator Nov 3, 2023
@JakNowy
Copy link
Author

JakNowy commented Nov 3, 2023

Bumping. It can be worked around with some if statements (ideally switch case in new python), but still pollutes the code notably.

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

No branches or pull requests

1 participant