Skip to content

Commit 35625a9

Browse files
committed
new version of Pytorch dataset tested with EMNIST and KMNIST
1 parent bb38814 commit 35625a9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_dataset_attributes.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import pytest
22

33
from continuum import datasets as cont_datasets
4+
from torchvision.datasets import EMNIST, KMNIST
5+
from continuum.datasets import PyTorchDataset
46

57
ATTRS = ["get_data", "_download"]
68

@@ -11,3 +13,13 @@ def test_has_attr(dataset_name):
1113

1214
for attr in ATTRS:
1315
assert hasattr(d, attr), (dataset_name, attr)
16+
17+
18+
@pytest.mark.slow
19+
def test_PytorchDataset_EMNIST(tmpdir):
20+
dataset_train = PyTorchDataset(tmpdir, dataset_type=EMNIST, train=True, download=True, split='letters')
21+
22+
23+
@pytest.mark.slow
24+
def test_PytorchDataset_KMNIST(tmpdir):
25+
dataset_train = PyTorchDataset(tmpdir, dataset_type=KMNIST, train=True, download=True)

0 commit comments

Comments
 (0)