class_docstr: Test caching.
docstr: Test dataset caching.
docstr_tok: ["Test","dataset","caching","."]
code: def test_caching(self):
      """Test dataset caching."""
      digest = _digest_kwargs(dict())
      directory = PYKEEN_DATASETS.joinpath(
          Nations().get_normalized_name(), "cache", digest
      )
      # clear
      if directory.exists():
          shutil.rmtree(directory)
      t1 = _time_cached_get_dataset("nations")
      t2 = _time_cached_get_dataset("nations")
      assert t2 < t1 + 1.0e-04
  
file_path: pykeen/tests/test_datasets/test_cache.py
imports: import pathlib
  import shutil
  import tempfile
  import unittest
  from timeit import default_timer
  from pykeen.constants import PYKEEN_DATASETS
  from pykeen.datasets import Nations
  from pykeen.datasets.base import Dataset
  from pykeen.datasets.utils import _cached_get_dataset, _digest_kwargs
label_desc: Use image node_id 1 for calling the TestDatasetCaching obj's underlying member method code with example usage: obj.test_caching() without return types