From e1fdae40a36d8d0ea0935f99d0922f1f7c40ad7a Mon Sep 17 00:00:00 2001 From: Blake Caldwell Date: Fri, 2 Oct 2020 17:44:47 -0400 Subject: [PATCH] TST: use correct paths for starting view windows --- tests/test_view_windows.py | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/tests/test_view_windows.py b/tests/test_view_windows.py index bb19319c0..ce6be1f51 100644 --- a/tests/test_view_windows.py +++ b/tests/test_view_windows.py @@ -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)