MCPcopy Index your code
hub / github.com/huggingface/datasets / test_offline_dataset_module_factory

Method test_offline_dataset_module_factory

tests/test_load.py:720–730  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

718
719 @pytest.mark.integration
720 def test_offline_dataset_module_factory(self):
721 repo_id = SAMPLE_DATASET_IDENTIFIER2
722 builder = load_dataset_builder(repo_id, cache_dir=self.cache_dir)
723 builder.download_and_prepare()
724 for offline_simulation_mode in list(OfflineSimulationMode):
725 with offline(offline_simulation_mode):
726 self._caplog.clear()
727 # allow provide the repo id without an explicit path to remote or local actual file
728 dataset_module = datasets.load.dataset_module_factory(repo_id, cache_dir=self.cache_dir)
729 self.assertEqual(dataset_module.module_path, "datasets.packaged_modules.cache.cache")
730 self.assertIn("Using the latest cached version of the dataset", self._caplog.text)
731
732 @pytest.mark.integration
733 def test_offline_dataset_module_factory_with_capital_letters_in_name(self):

Callers

nothing calls this directly

Calls 3

load_dataset_builderFunction · 0.90
offlineFunction · 0.85
download_and_prepareMethod · 0.45

Tested by

no test coverage detected