Hi, I need a way to distinguish whether the current module is being imported because we are running the tests, of whether we are running the main program.
I know that the correct way would be to inject the information from the top, but I'm using a framework which relies on some global state to store the various options, and I have to deal with it. Anyway, is there any official/recommended way to do it? What I'm doing right now is this (py 1.3.1): if py.test.config.__dict__ == {}: # py.test is NOT running ... else: # py.test is running ciao, Anto _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev