<div dir="ltr">HI all..<br><br>My testcases 'may' 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 "<span style="background-color:rgb(238,238,238);color:rgb(6,40,126);font-family:Consolas,Menlo,"Deja Vu Sans Mono","Bitstream Vera Sans Mono",monospace;font-size:15.3px;white-space:pre">pytest_cmdline_preparse"</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 "<span style="background-color:rgb(238,238,238);color:rgb(6,40,126);font-family:Consolas,Menlo,"Deja Vu Sans Mono","Bitstream Vera Sans Mono",monospace;font-size:15.3px;white-space:pre">pytest_cmdline_parse" </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>