Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)

src/m/i/milkcheck-HEAD/lib/MilkCheck/UI/Cli.py   milkcheck(Download)
 
        try:
            (self._options, self._args) = self._mop.parse_args(command_line)
 
            self._conf = ConfigParser(self._options)

src/m/i/milkcheck-HEAD/tests/MilkCheckTests/UITests/OptionParserTest.py   milkcheck(Download)
    def test_debug_config(self):
        '''Test configuration of the debug mode'''
        mop = McOptionParser()
        mop.configure_mop()
        (options, args) = mop.parse_args(['-d'])
        mop = McOptionParser()
        mop.configure_mop()
        (options, args) = mop.parse_args(['-d'])
        self.assertEqual(options.verbosity, 5)
        self.assertTrue(options.debug)
 
        mop = McOptionParser()
        mop.configure_mop()
        (options, args) = mop.parse_args(['-vvv'])
    def test_option_onlynodes(self):
        '''Test usage of the only-nodes option'''
        mop = McOptionParser()
        mop.configure_mop()
        (options, args) = mop.parse_args(['-n', 'foo8'])
        mop.configure_mop()
        (options, args) = \
            mop.parse_args(['service', 'start', '-n', 'foo1,foo2'])
        self.assertTrue(isinstance(options.only_nodes, NodeSet))
        self.assertTrue('foo1' in options.only_nodes)