示例#1
0
    def test_default_opts(self):
        # Default values for missing options.

        parser = appengine.make_parser()
        args = parser.parse_args(''.split())

        self.assertEqual(args.force, False)
        self.assertEqual(args.prefix, None)
        self.assertEqual(args.bindir, None)
        self.assertEqual(args.no_bindir, False)
示例#2
0
    def test_default_opts(self):
        # Default values for missing options.
        from appengine import make_parser

        parser = make_parser()
        opts, args = parser.parse_args(''.split())

        self.assertEqual(opts.force, False)
        self.assertEqual(opts.prefix, None)
        self.assertEqual(opts.bindir, None)
        self.assertEqual(opts.no_bindir, False)
示例#3
0
    def test_opts(self):
        # Argument option parsing.

        argv = '--prefix /foo/local --bindir /foo/local/bin --force --no-bindir'
        parser = appengine.make_parser()
        args = parser.parse_args(argv.split())

        self.assertEqual(args.force, True)
        self.assertEqual(args.prefix, '/foo/local')
        self.assertEqual(args.bindir, '/foo/local/bin')
        self.assertEqual(args.no_bindir, True)
示例#4
0
    def test_opts(self):
        # Argument option parsing.
        from appengine import make_parser

        argv = '--prefix /foo/local --bindir /foo/local/bin --force --no-bindir'
        parser = make_parser()
        opts, args = parser.parse_args(argv.split())

        self.assertEqual(opts.force, True)
        self.assertEqual(opts.prefix, '/foo/local')
        self.assertEqual(opts.bindir, '/foo/local/bin')
        self.assertEqual(opts.no_bindir, True)