'If an exception is raised while L{FilePath.copyTo} is copying bytes
between two regular files, the source and destination files are closed
and the exception propagates to the caller of L{FilePath.copyTo}.'

def test_copyToFileClosing(self):

    destination = ExplodingFilePath(self.mktemp())
    source = ExplodingFilePath(__file__)
    self.assertRaises(IOError, source.copyTo, destination)
    self.assertTrue(source.fp.closed)
    self.assertTrue(destination.fp.closed)
