2011-02-25 09:04:37 +08:00
|
|
|
"""Fixture module to skip the datasets loading when offline
|
|
|
|
|
|
|
|
|
|
Doctests are skipped if the datasets have not already been dowloaded
|
|
|
|
|
and cached in the past.
|
|
|
|
|
"""
|
|
|
|
|
from os.path import exists
|
2011-03-20 00:21:35 +08:00
|
|
|
from os.path import join
|
2011-02-25 09:04:37 +08:00
|
|
|
from nose import SkipTest
|
|
|
|
|
from scikits.learn.datasets import get_data_home
|
|
|
|
|
|
|
|
|
|
def setup_module(module):
|
2011-03-20 00:21:35 +08:00
|
|
|
data_home = get_data_home()
|
|
|
|
|
if (not exists(join(data_home, 'lfw_home'))
|
|
|
|
|
or not exists(join(data_home,'20news_home'))):
|
2011-02-25 09:04:37 +08:00
|
|
|
raise SkipTest("Skipping dataset loading doctests")
|