On Fri, Mar 25, 2011 at 3:51 AM, raymond.hettinger <python-check...@python.org> wrote: > http://hg.python.org/cpython/rev/5adddc6be3c1 > changeset: 68902:5adddc6be3c1 > user: Raymond Hettinger <pyt...@rcn.com> > date: Thu Mar 24 10:51:06 2011 -0700 > summary: > Remove test_importable(). Couldn't see how to make this reliable across all > platforms.
For this particular use case, a temporary directory added to sys,path, then some subsequent cleanup of sys.modules, sys.path and sys.path_importer_cache would likely do the trick. I've actually never been a fan of using TESTFN in tests - the tempfile module always struck me as being significantly more useful. It also makes tidying up the files afterwards really easy - the temporary directory context manager will blow everything away for you. Then again, quite a few of the tests I've written involved convoluted module hierarchies, so I'm likely a little biased by my typical use cases :) Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com