def METHOD_NAME(self):
    dirname = self.get_testfn()
    os.mkdir(dirname)
    sys.argv += ["-d", dirname, "-p", "0"]
    pyftpdlib.__main__.main()
    # without argument
    sys.argv = self.SYSARGV[:]
    sys.argv += ["-d"]
    sys.stderr = self.devnull
    self.assertRaises(SystemExit, pyftpdlib.__main__.main)
    # no such directory
    sys.argv = self.SYSARGV[:]
    sys.argv += ["-d %s" % dirname]
    safe_rmpath(dirname)
    self.assertRaises(ValueError, pyftpdlib.__main__.main)