def _CreateReadTaskOptions(build_option_template, test_option_template,
                           read_option_template, analysis_options, change):
    return read_value.TaskOptions(test_options=run_test.TaskOptions(
        build_options=find_isolate.TaskOptions(
            change=change, **build_option_template._asdict()),
        attempts=analysis_options.min_attempts,
        **test_option_template._asdict()),
                                  **read_option_template._asdict())
 def setUp(self):
   super(FindIsolateEvaluatorBase, self).setUp()
   self.maxDiff = None  # pylint: disable=invalid-name
   self.job = job_module.Job.New((), ())
   task_module.PopulateTaskGraph(
       self.job,
       find_isolate.CreateGraph(
           find_isolate.TaskOptions(
               builder='Mac Builder',
               target='telemetry_perf_tests',
               bucket='luci.bucket',
               change=change_module.Change.FromDict({
                   'commits': [{
                       'repository': 'chromium',
                       'git_hash': '7c7e90be',
                   }],
               }))))
 def setUp(self):
     super(EvaluatorTest, self).setUp()
     self.maxDiff = None
     self.job = job_module.Job.New((), ())
     task_module.PopulateTaskGraph(
         self.job,
         run_test.CreateGraph(
             run_test.TaskOptions(build_options=find_isolate.TaskOptions(
                 builder='Some Builder',
                 target='telemetry_perf_tests',
                 bucket='luci.bucket',
                 change=change_module.Change.FromDict({
                     'commits': [{
                         'repository': 'chromium',
                         'git_hash': 'aaaaaaa',
                     }]
                 })),
                                  swarming_server='some_server',
                                  dimensions=DIMENSIONS,
                                  extra_args=[],
                                  attempts=10)))
 def PopulateTaskGraph(self,
                       benchmark=None,
                       chart=None,
                       grouping_label=None,
                       story=None,
                       statistic=None,
                       trace='some_trace',
                       mode='histogram_sets'):
   task_module.PopulateTaskGraph(
       self.job,
       read_value.CreateGraph(
           read_value.TaskOptions(
               test_options=run_test.TaskOptions(
                   build_options=find_isolate.TaskOptions(
                       builder='Some Builder',
                       target='telemetry_perf_tests',
                       bucket='luci.bucket',
                       change=change_module.Change.FromDict({
                           'commits': [{
                               'repository': 'chromium',
                               'git_hash': 'aaaaaaa',
                           }]
                       })),
                   swarming_server='some_server',
                   dimensions=[],
                   extra_args=[],
                   attempts=10),
               benchmark=benchmark,
               histogram_options=read_value.HistogramOptions(
                   grouping_label=grouping_label,
                   story=story,
                   statistic=statistic,
                   histogram_name=chart,
               ),
               graph_json_options=read_value.GraphJsonOptions(
                   chart=chart, trace=trace),
               mode=mode,
           )))