@contextmanager
  def mock_safe_classpath_helper(self, create_synthetic_jar=True):
    with patch('pants.java.util.safe_classpath') as mock_safe_classpath:
      mock_safe_classpath.side_effect = fake_safe_classpath
      yield mock_safe_classpath

    self.runner.run.assert_called_once_with()
    if create_synthetic_jar:
      self.executor.runner.assert_called_once_with(self.SAFE_CLASSPATH, self.TEST_MAIN,
                                                    args=None, jvm_options=None, cwd=None)
      mock_safe_classpath.assert_called_once_with(self.TEST_CLASSPATH, self.SYNTHETIC_JAR_DIR)
    else:
      self.executor.runner.assert_called_once_with(self.TEST_CLASSPATH, self.TEST_MAIN,
                                                    args=None, jvm_options=None, cwd=None)
      mock_safe_classpath.assert_not_called()
Returns the size of the logs buffer, in bytes.
dataset/ETHPy150Open pantsbuild/pants/tests/python/pants_test/java/test_util.py/ExecuteJavaTest.mock_safe_classpath_helper--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/logservice/logservice.py/log_buffer_bytes