Several dataset tests fail instead of skip
goodfeli opened this issue · 2 comments
goodfeli commented
When you write a test for a dataset, it should skip rather than fail if the user hasn't installed that dataset.
I'm not totally sure how these tests are passing on Travis but tons of them fail on my non-LISA machine:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/local/google/home/goodfellow/pylearn2/pylearn2/datasets/tests/test_wiskott.py", line 12, in test_wiskott
data = Wiskott()
File "/usr/local/google/home/goodfellow/pylearn2/pylearn2/datasets/wiskott.py", line 30, in __init__
X = 1. - load(path)
File "/usr/local/google/home/goodfellow/pylearn2/pylearn2/utils/serial.py", line 107, in load
return np.load(filepath)
File "/usr/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 370, in load
fid = open(file, "rb")
IOError: [Errno 2] No such file or directory: '/usr/local/google/home/goodfellow/data/wiskott/wiskott_fish_layer0_15_standard_64x64_shuffled.npy'
goodfeli commented
Looks like 41 tests fail in this way for me right now
lamblin commented
The tests are skipped if PYLEARN2_DATA_PATH
is not defined, that is how they are passing on Travis.
Indeed, the individual tests should also be skipped if the corresponding dataset is not installed.