pytest two level of parametrization when one parameter is generated by the other one
<p>I have a scenario where I have a parameter list. Each of this parameter can generate another parameter list and I want to paramererize my test based on both parameter.</p>

<p>Something similar to what I is being done with <code>for loop</code> below but using parameterization.
Also <code>test_1</code> and <code>test_2</code> should be executed together for any set of parameters</p>

<p>Any help??</p>

<pre><code>param1 = [&lt;some_list&gt;]
#param2 = [&lt;some_list_Generated_based_on_Param1&gt;]

for arg1 in param1:
    param2 = get_param2(arg1)
    for arg2 in param2
        def test_1():
            ...
            pass
        def test_2():
            ...
            pass
</code></pre>