Skip to content

Commit 0a8b0a8

Browse files
test: add builder test
1 parent 6990f99 commit 0a8b0a8

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tensorflow_datasets/datasets/pneumoniamnist/pneumoniamnist_dataset_builder_test.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
"""pneumoniamnist dataset."""
22

3-
from tensorflow_datasets.image_classification.pneumoniamnist.pneumoniamnist import pneumoniamnist_dataset_builder
3+
# from tensorflow_datasets.datasets.pneumoniamnist import pneumoniamnist_dataset_builder
4+
from . import pneumoniamnist_dataset_builder
45
import tensorflow_datasets.public_api as tfds
56

67
class PneumoniamnistTest(tfds.testing.DatasetBuilderTestCase):
78
"""Tests for pneumoniamnist dataset."""
8-
# TODO(pneumoniamnist):
9+
910
DATASET_CLASS = pneumoniamnist_dataset_builder.Builder
1011
SPLITS = {
11-
'train': 3, # Number of fake train example
12-
'test': 1, # Number of fake test example
12+
'train': 3,
13+
'val': 1,
14+
'test': 1,
15+
}
16+
17+
DL_EXTRACT_RESULT = {
18+
'https://zenodo.org/record/10519652/files/pneumoniamnist.npz?download=1': 'dummy_data/pneumoniamnist.npz',
1319
}
1420

15-
# If you are calling `download/download_and_extract` with a dict, like:
16-
# dl_manager.download({'some_key': 'http://a.org/out.txt', ...})
17-
# then the tests needs to provide the fake output paths relative to the
18-
# fake data directory
19-
# DL_EXTRACT_RESULT = {'some_key': 'output_file1.txt', ...}
2021

2122

2223
if __name__ == '__main__':

0 commit comments

Comments
 (0)