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

Kai Grossjohann kai.grossjohann at verizonbusiness.com
Wed May 10 13:27:16 EDT 2006


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



More information about the Python-list mailing list