Skip to content

Commit

Permalink
[MRG] Removing creation of test folder locally (#400)
Browse files Browse the repository at this point in the history
* Removing annoying creation of test folder locally.

* Fix for travis.
  • Loading branch information
adam2392 authored May 2, 2020
1 parent 4cda789 commit 4930b7a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions mne_bids/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,21 @@ def test_make_folders():
make_bids_folders(subject='hi', kind='ba', bids_root=bids_root,
overwrite=True, verbose=True)

# Check if bids_root=None creates folders in the current working directory
make_bids_folders(subject='hi', session='foo', kind='ba',
bids_root=None)
assert op.isdir(op.join(os.getcwd(), 'sub-hi', 'ses-foo', 'ba'))

# Check if a pathlib.Path bids_root works.
bids_root = Path(_TempDir())
make_bids_folders(subject='hi', session='foo', kind='ba',
bids_root=bids_root)
assert op.isdir(op.join(bids_root, 'sub-hi', 'ses-foo', 'ba'))

# Check if bids_root=None creates folders in the current working directory
bids_root = _TempDir()
curr_dir = os.getcwd()
os.chdir(bids_root)
make_bids_folders(subject='hi', session='foo', kind='ba',
bids_root=None)
assert op.isdir(op.join(os.getcwd(), 'sub-hi', 'ses-foo', 'ba'))
os.chdir(curr_dir)


def test_check_types():
"""Test the check whether vars are str or None."""
Expand Down

0 comments on commit 4930b7a

Please sign in to comment.