Skip to content

Commit

Permalink
TST: use correct paths for starting view windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake Caldwell committed Oct 2, 2020
1 parent 644be40 commit e1fdae4
Showing 1 changed file with 6 additions and 27 deletions.
33 changes: 6 additions & 27 deletions tests/test_view_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,19 @@ def view_window(cmd):
if proc.returncode != 0:
raise RuntimeError("Running command %s failed" % cmd)


def test_view_rast():
if 'SYSTEM_USER_DIR' in os.environ:
basedir = os.environ['SYSTEM_USER_DIR']
else:
basedir = os.path.expanduser('~')

fetch_file('spk.txt')
ntrials = 3
for trial_idx in range(ntrials):
fetch_file('spk_%d.txt' % trial_idx)

spike_file = os.path.join(basedir, 'spk.txt')
fname = 'spk.txt'
fetch_file(fname)
paramf = op.join('param', 'default.param')
cmd = sys.executable + ' visrast.py ' + paramf + ' ' + spike_file

cmd = sys.executable + ' visrast.py ' + paramf + ' ' + fname
view_window(cmd)


def test_view_dipole():
if 'SYSTEM_USER_DIR' in os.environ:
basedir = os.environ['SYSTEM_USER_DIR']
else:
basedir = os.path.expanduser('~')

fetch_file('dpl.txt')
ntrials = 3
for trial_idx in range(ntrials):
fetch_file('dpl_%d.txt' % trial_idx)

dipole_file = os.path.join(basedir, 'dpl.txt')
fname = 'dpl.txt'
fetch_file(fname)
paramf = op.join('param', 'default.param')
cmd = sys.executable + ' visdipole.py ' + paramf + ' ' + dipole_file

cmd = sys.executable + ' visdipole.py ' + paramf + ' ' + fname
view_window(cmd)


Expand Down

0 comments on commit e1fdae4

Please sign in to comment.