"Brian van den Broek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > I'm just starting to employ unit testing (I'm using doctest), and I am > uncertain how to handle writing tests where the behaviour being tested is > dependant on whether certain file paths point to actual files.
I would think about writing a dummy 'file' function whose return or raising depends on the filename passed in. Then your test would be independent of the actual environment. For something more elaborate, I would google Google's Python newgroup archive for 'dummy filesystem' for past threads on the topic. TJR -- http://mail.python.org/mailman/listinfo/python-list