def test_datasets():
 for dname in ('sample', 'somato', 'spm_face', 'testing', 'bst_raw', 'bst_auditory', 'bst_resting', 'visual_92_categories'):
  if dname.startswith('bst'):
   dataset = getattr(datasets.brainstorm, dname)
  else:
   dataset = getattr(datasets, dname)
 if (dataset.data_path(download=False) != ''):
  assert_true(isinstance(dataset.get_version(), string_types))
 else:
  assert_true((dataset.get_version() is None))
 tempdir = _TempDir()
 os.environ['_MNE_FAKE_HOME_DIR'] = tempdir
 try:
  assert_equal(datasets.utils._get_path(None, 'foo', 'bar'), op.join(tempdir, 'mne_data'))
 finally:
  del os.environ['_MNE_FAKE_HOME_DIR']

def test_datasets ( ) : for dname in ( 'sample' , 'somato' , 'spm_face' , 'testing' , 'bst_raw' , 'bst_auditory' , 'bst_resting' , 'visual_92_categories' ) : if dname . startswith ( 'bst' ) : dataset = getattr ( datasets . brainstorm , dname ) else : dataset = getattr ( datasets , dname ) if ( dataset . data_path ( download = False ) != '' ) : assert_true ( isinstance ( dataset . get_version ( ) , string_types ) ) else : assert_true ( ( dataset . get_version ( ) is None ) ) tempdir = _TempDir ( ) os . environ [ '_MNE_FAKE_HOME_DIR' ] = tempdir try : assert_equal ( datasets . utils . _get_path ( None , 'foo' , 'bar' ) , op . join ( tempdir , 'mne_data' ) ) finally : del os . environ [ '_MNE_FAKE_HOME_DIR' ]
test simple dataset functions .