Beispiel #1
0
 def testGoodArgFile_FileArgUsedIfCliArgIsNone(self):
   args = test_utils.NewNameSpace([], test='jill.apk', results_bucket=None)
   file_args = arg_file.GetArgsFromArgFile(GOOD_ARGS + ':test-override',
                                           COMMON_ARGS)
   arg_util.ApplyLowerPriorityArgs(args, file_args, True)
   self.assertEqual(args.results_bucket, 'gs://arg-file-bucket')
   self.AssertErrContains('')
Beispiel #2
0
 def testGoodArgFile_FileArgDoesNotOverrideCliArg(self):
   args = test_utils.NewNameSpace([], test='jill.apk', results_bucket='jack')
   file_args = arg_file.GetArgsFromArgFile(GOOD_ARGS + ':test-override',
                                           COMMON_ARGS)
   arg_util.ApplyLowerPriorityArgs(args, file_args, True)
   self.assertEqual(args.results_bucket, 'jack')
   self.AssertErrContains('"--results-bucket jack" overrides file argument ')
   self.AssertErrContains('"results-bucket: gs://arg-file-bucket"')
Beispiel #3
0
    def NewTestArgs(self, **kwargs):
        """Create a Namespace containing attributes for all `test ios run` args.

    All args, for the specified release track, except those appearing in
    **kwargs are set to None by default so that unit tests won't get missing
    attribute errors.

    Args:
      **kwargs: a map of any args which should have values other than None.
    Returns:
      The created argparse.Namespace instance.
    """
        return test_utils.NewNameSpace(ALL_TEST_RUN_ARGS[self.track], **kwargs)
Beispiel #4
0
 def NewTestArgs(self, **kwargs):
     return test_utils.NewNameSpace(ALL_TEST_RUN_ARGS[self.track], **kwargs)