John Nagle <[EMAIL PROTECTED]> writes: > If you want to force [an error while closing a file], write to > a drive reached over a network, or a removable medium like a floppy > or flash card. Open a file for writing and disconnect the network > or remove the removable medium.
Or simply use a mock library, create a mock file object, and guarantee (for the purpose of your unit test) that it *will* raise the appropriate error without interacting with the rest of the system. -- \ "Ours is a world where people don't know what they want and are | `\ willing to go through hell to get it." -- Donald Robert Perry | _o__) Marquis | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list