t2y / pytest-quickcheck

Apache License 2.0
14 stars 1 forks source link

Support for Metafunc #7

Open t2y opened 4 years ago

t2y commented 4 years ago

(Original issue 7 created by None on 2017-09-13T07:01:23.171356+00:00)

I've extended Generator for django models and am using quickcheck to create objects to store for tests (running alongisde pytest-django).

The only way to reliably do this is to implement fixtures that pick up the generated data and store it. This works well, but I end up with a long list of randomize parameters for every test.

It would be fantastic if, similar to pytest's parametrize, I could tag my functions using pytest_generate_tests to create the necessary randomized input for tests relying on certain fixtures.

t2y commented 4 years ago

(Original comment by t2y on 2017-09-16T06:04:25.943464+00:00)

I'm not sure how pytest-quickcheck integrated with pytest-django. Could yo tell me some concrete examples or tutorials for your needs?

t2y commented 4 years ago

(Original comment by t2y on 2017-09-16T06:10:48.164670+00:00)

And I welcome to review Pull Request achieving your purpose if it doesn't break current design.