from os.path import expanduser, exists, join

from neuroimaging.io.datasource import Repository

# data directory should be: $HOME/.nipy/tests/data
datapath = expanduser(join('~', '.nipy', 'tests', 'data'))

if not exists(datapath):
    raise IOError, 'Nipy data directory is not found!'

repository = Repository(datapath)



# Fernando pointed out that we should wrap the test data into a
# tarball and write a pure python function to grab the data for people
# instead of using svn.  Users may not have svn and the mkdir may not
# work on Windows.

from os.path import expanduser, exists, join

from neuroimaging.io.datasource import Repository

# data directory should be: $HOME/.nipy/tests/data
datapath = expanduser(join('~', '.nipy', 'tests', 'data'))

if not exists(datapath):
    msg = 'Nipy data directory is not found!\n%s' % __doc__
    raise IOError(msg)

repository = Repository(datapath)

Extend error message regarding missing test data.
Extend error message regarding missing test data.
+ 
+ # Fernando pointed out that we should wrap the test data into a
+ # tarball and write a pure python function to grab the data for people
+ # instead of using svn.  Users may not have svn and the mkdir may not
+ # work on Windows.
+ 
  from os.path import expanduser, exists, join
  
  from neuroimaging.io.datasource import Repository
  
  # data directory should be: $HOME/.nipy/tests/data
  datapath = expanduser(join('~', '.nipy', 'tests', 'data'))
  
  if not exists(datapath):
-     raise IOError, 'Nipy data directory is not found!'
+     msg = 'Nipy data directory is not found!\n%s' % __doc__
+     raise IOError(msg)
  
  repository = Repository(datapath)
  
- 
Extend error message regarding missing test data.
## Code Before:
from os.path import expanduser, exists, join

from neuroimaging.io.datasource import Repository

# data directory should be: $HOME/.nipy/tests/data
datapath = expanduser(join('~', '.nipy', 'tests', 'data'))

if not exists(datapath):
    raise IOError, 'Nipy data directory is not found!'

repository = Repository(datapath)


## Instruction:
Extend error message regarding missing test data.
## Code After:

# Fernando pointed out that we should wrap the test data into a
# tarball and write a pure python function to grab the data for people
# instead of using svn.  Users may not have svn and the mkdir may not
# work on Windows.

from os.path import expanduser, exists, join

from neuroimaging.io.datasource import Repository

# data directory should be: $HOME/.nipy/tests/data
datapath = expanduser(join('~', '.nipy', 'tests', 'data'))

if not exists(datapath):
    msg = 'Nipy data directory is not found!\n%s' % __doc__
    raise IOError(msg)

repository = Repository(datapath)
