code: def test_compute_error(
      app_config: AppConfig, get_job_runner: GetJobRunner
  ) -> None:
      dataset = "error"
      config = "error"
      # we could also have tested if dataset-info has a response (it's one case among many, see
      # libcommon.simple_cache.get_best_response)
      upsert_response(
          kind="dataset-config-names",
          dataset=dataset,
          dataset_git_revision=REVISION_NAME,
          content={
              "config_names": [
                  {
                      "dataset": dataset,
                      "config": config,
                  }
              ]
          },
          http_status=HTTPStatus.OK,
      )
      # we don't really need both parent responses here, but why not (it's one case among many, see
      # libcommon.simple_cache.get_best_response)
      upsert_response(
          kind="config-split-names-from-info",
          dataset=dataset,
          dataset_git_revision=REVISION_NAME,
          config=config,
          content={},
          http_status=HTTPStatus.INTERNAL_SERVER_ERROR,
      )
      upsert_response(
          kind="config-split-names-from-streaming",
          dataset=dataset,
          dataset_git_revision=REVISION_NAME,
          config=config,
          content={},
          http_status=HTTPStatus.INTERNAL_SERVER_ERROR,
      )
      job_runner = get_job_runner(dataset, app_config)
      response = job_runner.compute()
      assert response.content == {
          "splits": [],
          "failed": [
              {"dataset": dataset, "config": config, "error": {}}
          ],
          "pending": [],
      }
      assert response.progress == 1.0
  
file_path: datasets-server/services/worker/tests/job_runners/dataset/test_split_names.py
imports: from collections.abc import Callable
  from http import HTTPStatus
  from typing import Any
  import pytest
  from libcommon.exceptions import PreviousStepFormatError
  from libcommon.resources import CacheMongoResource, QueueMongoResource
  from libcommon.simple_cache import CachedArtifactNotFoundError, upsert_response
  from libcommon.utils import Priority
  from worker.config import AppConfig
  from worker.job_runners.dataset.split_names import DatasetSplitNamesJobRunner
  from ..utils import REVISION_NAME
label_desc: Use image node_id 3 for calling a global function with example usage: test_compute_error(app_config, get_job_runner) without return types