Hi Holger, and all, Thank you so much for the quick response, and sorry I could not come back  with the results earlier.<br>
<br>
The &quot;runtesthelper.py&quot; works fine to run  tests in a console and inside Maya without using any plugin.<br>
But I need to use the <b>keyword</b> plugin because I have to select some test
that runs inside maya, and deselect other that run in another
application....<br><br>
I was registering it with the following code. (likely not to be the
best way, and  as you said it&#39;s kind of a hack using py.test.config,)<br>
<br>
import os, py<br>
os.environ[&#39;PYTEST_PLUGINS&#39;] = &#39;keyword&#39;<br>
py.test.config.pluginmanager.consider_env()<br>
py.test.config.pluginmanager.do_configure(py.test.config)<br>
<br>
but now when I used the &quot;runtesthelper.py&quot; I got an error, so I could not
manage yet to read the keyword plugin and then execute my tests.<br>
<br>
You were saying that py.test.config is kind of deprecated.?..so, what
should I use instead? Or what will be the correct way to register a
plugin from inside a console and then run the test using your
&quot;runtesthelper.py&quot;<br>
<br>
Thanks a lot <br>
Fede<br><br><div class="gmail_quote">On Thu, Oct 8, 2009 at 10:48 PM, holger krekel <span dir="ltr">&lt;holger@merlinux.eu&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
and here is the file actually attached.<br>
<br>
holger<br>
<div><div></div><div class="h5"><br>
On Thu, Oct 08, 2009 at 13:47 +0200, holger krekel wrote:<br>
<br>
&gt; Hi Fede,<br>
&gt;<br>
&gt; On Wed, Oct 07, 2009 at 17:21 +1100, Fede Naum wrote:<br>
&gt; &gt; Hello, I did a search by subject in the py-dev Archives and could not found<br>
&gt; &gt; any thread about that.<br>
&gt; &gt; I guess it is because the documentation clearly say &quot;py.test is a *command<br>
&gt; &gt; line tool* to collect and run automated tests&quot;.<br>
&gt;<br>
&gt; somewhat true :)<br>
&gt;<br>
&gt; &gt; I&#39;m using as it is for some integration test but now I want to use it to run<br>
&gt; &gt; them from inside a python shell<br>
&gt; &gt; Is there a way to run the autodiscovery + run the test + get the report from<br>
&gt; &gt; inside a python console?<br>
&gt;<br>
&gt; I&#39;ve attached a small &quot;runtesthelper.py&quot; script whose &quot;pytest&quot; function<br>
&gt; you could import into your environment, best through PYTHONSTARTUP.<br>
&gt; It&#39;s a bit of a hack because of &quot;py.test.config&quot; has some global state<br>
&gt; (using that config object is btw deprecated).<br>
&gt;<br>
&gt; &gt; Why do I need that?<br>
&gt; &gt; I need it because I have to do it from inside a special console (the python<br>
&gt; &gt; console provided with Maya -<br>
&gt; &gt; <a href="http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13577897" target="_blank">http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13577897</a>) so<br>
&gt; &gt; I do not have any command line environmet to run py.test<br>
&gt;<br>
&gt; makes sense.  Let us now if the above works well enough and/or<br>
&gt; what you&#39;d like to see.  I&#39;d like to see usage-from-the shell<br>
&gt; get fully supported by default.<br>
&gt;<br>
&gt; best,<br>
&gt; holger<br>
<br>
</div></div><font color="#888888">--<br>
Metaprogramming, Python, Testing: <a href="http://tetamap.wordpress.com" target="_blank">http://tetamap.wordpress.com</a><br>
Python, PyPy, pytest contracting: <a href="http://merlinux.eu" target="_blank">http://merlinux.eu</a><br>
</font></blockquote></div><br>