def test_getContentFileClosing(self):
        """
        If reading from the underlying file raises an exception,
        L{FilePath.getContent} raises that exception after closing the file.
        """
        fp = ExplodingFilePath(b"")
        self.assertRaises(IOError, fp.getContent)
        self.assertTrue(fp.fp.closed)

        If reading from the underlying file raises an exception,
        L{FilePath.getContent} raises that exception after closing the file.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_paths.py