<div dir="ltr"><div dir="ltr">Fabian,<div><br></div><div>`setup_module(module)` is a supported nose function.</div><div><br></div><div>I know that I&#39;m not giving you the answer that you want, which is essentially to be able to grab config from your `setup_module(module)` as is.</div><div><br></div><div>However, you are already using pytest. Why are you holding onto `setup_module(module)`?</div><div><br></div><div>If you change the signature of that function to be a proper pytest fixture, it will then be easy.</div><div><br></div><div>``</div><div>@pytest.fixture(scope=&#39;module&#39;, autouse=True)</div><div>def setup_module(name):</div><div>    print(f&quot;\nsetup_module() name: {name}&quot;)`</div><div>```</div><div><br></div><div>Regards,</div><div>Brian</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 22, 2019 at 7:13 AM Fabian Cenedese &lt;<a href="mailto:Cenedese@indel.ch">Cenedese@indel.ch</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">At 14:54 22.03.2019, you wrote:<br>
<br>
&gt;Fabian,<br>
&gt;Use the new `pytestconfig` fixture.<br>
&gt;<br>
&gt;# --------- conftest.py<br>
&gt;<br>
&gt;def pytest_addoption(parser):<br>
&gt;    parser.addoption(&quot;--name&quot;, action=&quot;store&quot;, default=&quot;default name&quot;)<br>
&gt;<br>
&gt;#  ------- test_param.py <br>
&gt;import pytest<br>
&gt;<br>
&gt;@pytest.fixture()<br>
&gt;def name(pytestconfig):<br>
&gt;    return pytestconfig.getoption(&quot;name&quot;)<br>
&gt;<br>
&gt;def test_print_name(name):<br>
&gt;        print(f&quot;\ncommand line param (name): {name}&quot;)<br>
<br>
I have already seen the example with normal test functions. But I want<br>
to use the value in the setup function which is defined as<br>
<br>
def setup_module(module):<br>
<br>
so I can&#39;t add the fixture there. How I can use the value in the setup?<br>
<br>
Thanks<br>
<br>
bye  Fabi<br>
<br>
</blockquote></div>