Test if code is executed from within a py.test session

L

Laizer

Guest
I'd like to connect to a different database if my code is running under py.test. Is there a function to call or an environment variable that I can test that will tell me if I'm running under a py.test session? What's the best way to handle this?

Continue reading...
 
Top