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 "runtesthelper.py" 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's kind of a hack using py.test.config,)<br>
<br>
import os, py<br>
os.environ['PYTEST_PLUGINS'] = 'keyword'<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 "runtesthelper.py" 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
"runtesthelper.py"<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"><holger@merlinux.eu></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>
> Hi Fede,<br>
><br>
> On Wed, Oct 07, 2009 at 17:21 +1100, Fede Naum wrote:<br>
> > Hello, I did a search by subject in the py-dev Archives and could not found<br>
> > any thread about that.<br>
> > I guess it is because the documentation clearly say "py.test is a *command<br>
> > line tool* to collect and run automated tests".<br>
><br>
> somewhat true :)<br>
><br>
> > I'm using as it is for some integration test but now I want to use it to run<br>
> > them from inside a python shell<br>
> > Is there a way to run the autodiscovery + run the test + get the report from<br>
> > inside a python console?<br>
><br>
> I've attached a small "runtesthelper.py" script whose "pytest" function<br>
> you could import into your environment, best through PYTHONSTARTUP.<br>
> It's a bit of a hack because of "py.test.config" has some global state<br>
> (using that config object is btw deprecated).<br>
><br>
> > Why do I need that?<br>
> > I need it because I have to do it from inside a special console (the python<br>
> > console provided with Maya -<br>
> > <a href="http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=13577897" target="_blank">http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=13577897</a>) so<br>
> > I do not have any command line environmet to run py.test<br>
><br>
> makes sense. Let us now if the above works well enough and/or<br>
> what you'd like to see. I'd like to see usage-from-the shell<br>
> get fully supported by default.<br>
><br>
> best,<br>
> 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>