From dd5c031075b8690770f5f12014b063b2c1412383 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Tue, 14 Apr 2020 17:26:11 +0100
Subject: [PATCH] TEST: try and avoid weird errors in conda-forge I

---
 tests/test_fslsub.py                 | 5 ++---
 tests/test_wrappers/test_fslstats.py | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/test_fslsub.py b/tests/test_fslsub.py
index 40d766828..d7c6460ca 100644
--- a/tests/test_fslsub.py
+++ b/tests/test_fslsub.py
@@ -22,7 +22,7 @@ from . import mockFSLDIR
 
 
 mock_fsl_sub = """
-#!{}
+#!/usr/bin/env python3
 
 import random
 import os
@@ -62,8 +62,7 @@ with open('{{}}.o{{}}'.format(cmd, jobid), 'w') as stdout, \
 
 print(str(jobid))
 sys.exit(0)
-""".format(sys.executable, op.dirname(fsl.__file__)).strip()
-
+""".format(op.dirname(fsl.__file__)).strip()
 
 @contextlib.contextmanager
 def fslsub_mockFSLDIR():
diff --git a/tests/test_wrappers/test_fslstats.py b/tests/test_wrappers/test_fslstats.py
index 8d20b4acc..a38bf86d5 100644
--- a/tests/test_wrappers/test_fslstats.py
+++ b/tests/test_wrappers/test_fslstats.py
@@ -18,9 +18,9 @@ from .. import mockFSLDIR as mockFSLDIR_base, make_random_image
 
 
 mock_fslstats = """
-#!{}
+#!/usr/bin/env python3
 
-shape = {{outshape}}
+shape = {outshape}
 
 import sys
 import numpy as np
@@ -31,7 +31,7 @@ if len(shape) == 1:
     data = data.reshape(1, -1)
 
 np.savetxt(sys.stdout, data, fmt='%i')
-""".format(sys.executable).strip()
+""".strip()
 
 
 @contextlib.contextmanager
-- 
GitLab