<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/testing/test_utils.py#L584-L610) |

Mock out the kaggle CLI.

    @contextlib.contextmanager
    tfds.testing.mock_kaggle_api(
        err_msg=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `err_msg` | `str`, if provided, the kaggle CLI will raise a CalledProcessError and this will be the command output. |

<br />

<br />

<br />

<br />

| ## Yields ||
|---|---|
| None, context will have kaggle CLI mocked out. ||

<br />