Skip to content

Commit

Permalink
Fix tests/test_dataset_common.py (#221)
Browse files Browse the repository at this point in the history
* fix-tests

* fix-tests

* fix-tests

* fix-tests

* style-test-dataset-common
  • Loading branch information
tayciryahmed authored May 29, 2020
1 parent 32c3715 commit 5778a27
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/test_dataset_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,9 @@ def test_load_real_dataset(self, dataset_name):
with tempfile.TemporaryDirectory() as temp_data_dir:
download_config = DownloadConfig()
download_config.download_mode = GenerateMode.FORCE_REDOWNLOAD
download_and_prepare_kwargs = {"download_config": download_config}

dataset = load_dataset(
"./datasets/" + dataset_name,
data_dir=temp_data_dir,
download_and_prepare_kwargs=download_and_prepare_kwargs,
"./datasets/" + dataset_name, data_dir=temp_data_dir, download_config=download_config
)
for split in dataset.keys():
self.assertTrue(len(dataset[split]) > 0)
Expand Down Expand Up @@ -236,10 +233,7 @@ def test_load_real_dataset(self, dataset_name):
with tempfile.TemporaryDirectory() as temp_data_dir:
download_config = DownloadConfig()
download_config.download_mode = GenerateMode.FORCE_REDOWNLOAD
download_and_prepare_kwargs = {"download_config": download_config}

dataset = load_dataset(
dataset_name, data_dir=temp_data_dir, download_and_prepare_kwargs=download_and_prepare_kwargs
)
dataset = load_dataset(dataset_name, data_dir=temp_data_dir, download_config=download_config)
for split in dataset.keys():
self.assertTrue(len(dataset[split]) > 0)

0 comments on commit 5778a27

Please sign in to comment.