def test_notDirectory(self):
        """
        C{errno.ENOTDIR} should be translated to L{ftp.IsNotADirectoryError}.
        """
        d = ftp.errnoToFailure(errno.ENOTDIR, "foo")
        return self.assertFailure(d, ftp.IsNotADirectoryError)

        C{errno.ENOTDIR} should be translated to L{ftp.IsNotADirectoryError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ftp.py