On Wednesday, September 23, 2015 at 8:18:43 PM UTC+2, 
alain.d...@nrc-cnrc.gc.ca wrote:
> I have a Pyramid app called tdddemoPyramidApp.py, for which I wrote a 
> bunch of integration tests using PhantomJS.
> I want those tests to be run by the Jenkins Continuous Integration server 
> whenever there is a new commit.
> I have managed to get this mostly working, except for one thing.
> Before I run the the unit tests, I need restart the tdddemoPyramidApp.py 
> script so that it runs the most recent version of the app. When I run the 
> tests outside of Jenkins, I just Ctrl-C the script and re-issue the command 
> python tdddemoPyramidApp.

I'm using a real wsgi server in a specific thread so you can use 
setUp/tearDown or pytest.fixtures to start/stop it. Then you can use 
subprocess to launch phantomjs tests

There is one in webtest (search for StopableWSGIServer in the docs) but now 
I'm using this 
https://github.com/gawel/aiowsgi/blob/master/aiowsgi/thread.py which I 
found more robust. It works with py27 even if it use asyncio. Unfortunatly 
this one is not documented.

Hope this can help.


You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to