<div dir="ltr">HI all..<br><br>My testcases &#39;may&#39; need some dynamic variables that are passed during invocation..<div><br>I saw pytest-variables plugin that does something similar.. The only disadvantage it accepts only a file.. Doesnt accept a dictionary or json.</div><div><br></div><div>So i was thinking i will have a pytest option to accept a dict or json  (as string and then literal-eval). Once it is evaluated i can write it into a file and then pass that parameter into --variables . I was thinking of using the hook &quot;<span style="background-color:rgb(238,238,238);color:rgb(6,40,126);font-family:Consolas,Menlo,&quot;Deja Vu Sans Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,monospace;font-size:15.3px;white-space:pre">pytest_cmdline_preparse&quot;</span> hook to do this data conversion . </div><div><br></div><div>Though its working fine i see that this particular hook is marked as deprecated in the hookspec. </div><div><br></div><div>Strangely &quot;<span style="background-color:rgb(238,238,238);color:rgb(6,40,126);font-family:Consolas,Menlo,&quot;Deja Vu Sans Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,monospace;font-size:15.3px;white-space:pre">pytest_cmdline_parse&quot; </span>  hook doesnt get called at all for me.</div><div><br></div><div>What are the other hooks i can use to do this manipulation?<br><br>Or is there a better way altogether to do this..</div><div><br></div><div>-- </div><div><div class="gmail_signature">Regards</div><div class="gmail_signature">Arun Kaliraja.B</div>
</div></div>