cd9f387c7261139e9ac1ac86e0319d8ac73b929c,tests/python/pants_test/engine/exp/scheduler_test_base.py,SchedulerTestBase,execute,#SchedulerTestBase#Any#Any#Any#,56

Before Change


  def execute(self, scheduler, storage, product, *subjects):
    Creates, runs, and returns an ExecutionRequest for the given product and subjects.
    request = scheduler.execution_request([product], storage.puts(subjects))
    res = LocalSerialEngine(scheduler, storage).execute(request)
    if res.error:
      raise res.error
    return request

After Change


  def execute(self, scheduler, storage, product, *subjects):
    Runs an ExecutionRequest for the given product and subjects, and returns the result value.
    request = self.execute_request(scheduler, storage, product, *subjects)
    states = [storage.get(key) for key in scheduler.root_entries(request).values()]
    if any(type(state) is not Return for state in states):
      raise ValueError("At least one request failed: {}".format(states))
    return list(state.value for state in states)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: cd9f387c7261139e9ac1ac86e0319d8ac73b929c
Time: 2016-03-15
Author: stuhood@gmail.com
File Name: tests/python/pants_test/engine/exp/scheduler_test_base.py
Class Name: SchedulerTestBase
Method Name: execute


Project Name: pantsbuild/pants
Commit Name: d8f0bd52827ec673a7f07ef818ea5ea740acd908
Time: 2019-01-25
Author: 1305167+cosmicexplorer@users.noreply.github.com
File Name: tests/python/pants_test/backend/python/tasks/util/build_local_dists_test_base.py
Class Name: BuildLocalPythonDistributionsTestBase
Method Name: _create_distribution_synthetic_target


Project Name: home-assistant/home-assistant
Commit Name: 61909e873f894591419ef25015df8360650886c3
Time: 2017-02-26
Author: paulus@paulusschoutsen.nl
File Name: tests/components/recorder/test_init.py
Class Name:
Method Name: _add_entities