unittest: How to fail if environment does not allow execution?

2006-05-10 Thread Kai Grossjohann
I wrote a test case that depends on a certain file existing in the environment. So, I guess I should test that the file exists in the setUp method. But what if it doesn't exist? How do I fail in that case? I would like to emit an error message explaining what is wrong. tia, Kai -- http://mail

Re: unittest: How to fail if environment does not allow execution?

2006-05-11 Thread Kai Grossjohann
Roy Smith wrote: > Kai Grossjohann <[EMAIL PROTECTED]> wrote: >> I wrote a test case that depends on a certain file existing in the >> environment. > > In theory, unit tests should not depend on any external factors, but > we all know the difference between theory a