<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#L890-L897) |

Mocks the `constants.DATA_DIR`.

    @contextlib.contextmanager
    tfds.testing.mock_default_data_dir() -> Iterator[str]