'When C{FilePath.makedirs} is called with C{ignoreExistingDirectory} set
to C{True} it throws an C{OSError} exceptions if path is a file.'

def test_makedirsIgnoreExistingDirectoryExistAlreadyAFile(self):

    fp = filepath.FilePath(self.mktemp())
    fp.create()
    self.assertTrue(fp.isfile())
    exception = self.assertRaises(OSError, fp.makedirs, ignoreExistingDirectory=True)
    self.assertEqual(exception.errno, errno.EEXIST)
