Пример #1
0
    def test_no_unknown_args(self):
        parser = argparse.ArgumentParser()
        parser.add_argument('-R', '--release', action='store_true')
        parser.add_argument('-T', '--validation-test', action='store_true')
        parser.add_argument('--darwin-xcrun-toolchain')

        args = migration.parse_args(parser,
                                    ['-RT', '--darwin-xcrun-toolchain=bar'])

        self.assertEqual(
            args,
            argparse.Namespace(release=True,
                               validation_test=True,
                               darwin_xcrun_toolchain='bar',
                               build_script_impl_args=[]))
Пример #2
0
    def test_no_unknown_args(self):
        parser = argparse.ArgumentParser()
        parser.add_argument('-R', '--release', action='store_true')
        parser.add_argument('-T', '--validation-test', action='store_true')
        parser.add_argument('--darwin-xcrun-toolchain')

        args = migration.parse_args(
            parser,
            ['-RT', '--darwin-xcrun-toolchain=bar'])

        self.assertEqual(
            args,
            argparse.Namespace(
                release=True,
                validation_test=True,
                darwin_xcrun_toolchain='bar',
                build_script_impl_args=[]))