def test_usage(self):
        try:
            self.cli.run(sys.argv)
            self.fail('Expected SystemExit')
        except __HOLE__, e:
            stderr = sys.stderr.getvalue()
            if isinstance(e.code, int):
                self.assertEqual(2, e.code)
            else:
                # OptionParser in Python 2.3 does not set the exit code.
                # Instead the 'code' contains the custom error message from the 
                # frontend
                stderr = stderr + e.code + '\n'
            self.assertEqual("""\
usage: pybabel command [options] [args]

pybabel: error: no valid command or option passed. try the -h/--help option for more information.
""", stderr.lower())
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Babel-0.9.6/babel/messages/tests/frontend.py/CommandLineInterfaceTestCase.test_usage