Skip to content
Snippets Groups Projects
Commit c68b8755 authored by Martin Craig's avatar Martin Craig Committed by Paul McCarthy
Browse files

Add a couple of simple tests for WSL run functionality

parent dab1d398
No related branches found
No related tags found
No related merge requests found
......@@ -212,3 +212,13 @@ def test_detect_ssh():
p = fslplatform.Platform()
assert not p.inSSHSession
assert not p.inVNCSession
def test_fslwsl():
with mock.patch.dict('os.environ', **{ 'FSLWSL' : '1'}):
p = fslplatform.Platform()
assert p.fslwsl
with mock.patch.dict('os.environ', **{ 'FSLWSL' : '0'}):
p = fslplatform.Platform()
assert not p.fslwsl
......@@ -410,3 +410,7 @@ def test_run_logcmd():
assert stdout == expstdout
assert open('my_stdout', 'rt').read() == expcmd + expstdout
def test_wslpath():
assert run.wslpath('c:\\Users\\Fishcake\\image.nii.gz') == '/mnt/c/Users/Fishcake/image.nii.gz'
assert run.wslpath('--input=x:\\transfers\\scratch\\image_2.nii') == '--input=/mnt/x/transfers/scratch/image_2.nii'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment