Created
January 18, 2017 11:39
-
-
Save poliarush/bc7fcc8e569313e810baebe1004e888a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from random import randint | |
def data_generator(): | |
# some logic | |
return [_ * randint(0, 10) for _ in range(10)] | |
class TestClass(object): | |
@pytest.mark.parametrize('param', data_generator()) | |
def test_data_generator(self, param): | |
assert param | |
@pytest.mark.parametrize('param', [_ * randint(0, 10) for _ in range(10)]) | |
def test_something(self, param): | |
assert param |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment