Skip to content

Commit eed2157

Browse files
committed
fix tests
1 parent 6009b57 commit eed2157

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

docker/nipype_test/Dockerfile_base

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,18 @@ ENV LANG=C.UTF-8 \
110110

111111
# Add conda-forge channel in conda
112112
RUN conda config --add channels conda-forge && \
113-
conda install -y lockfile nipype matplotlib sphinx boto boto3 coverage mock pbr nitime dipy && \
113+
conda install -y lockfile \
114+
nipype \
115+
matplotlib \
116+
sphinx \
117+
boto \
118+
boto3 \
119+
coverage \
120+
mock \
121+
pbr \
122+
nitime \
123+
dipy \
124+
pandas && \
114125
pip install nose-cov doctest-ignore-unicode configparser
115126

116127
CMD ["/bin/bash"]

docker/nipype_test/Dockerfile_py27

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ MAINTAINER The nipype developers https://github.com/nipy/nipype
3131

3232
# Downgrade python to 2.7
3333
RUN conda update -y conda && \
34-
conda update --all -y python=2.7
35-
34+
conda update --all -y python=2.7 && \
35+
pip install nose-cov doctest-ignore-unicode configparser
36+
3637
COPY docker/circleci/run_* /usr/bin/
3738
RUN chmod +x /usr/bin/run_*
3839

@@ -45,6 +46,6 @@ RUN pip install -r /root/src/nipype/requirements.txt
4546
COPY . /root/src/nipype
4647
RUN rm -r /usr/local/miniconda/lib/python2.7/site-packages/nipype* && \
4748
cd /root/src/nipype && \
48-
pip install -e .
49+
pip install -e .
4950

5051
CMD ["/bin/bash"]

nipype/interfaces/spm/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,11 @@ def _generate_job(self, prefix='', contents=None):
420420
jobstring += self._generate_job(prefix=None,
421421
contents=val)
422422
elif isinstance(val, list):
423-
val_format = ', '.join(['\'{}\''] * len(val)).format
423+
items_format = []
424+
for el in val:
425+
items_format += ['{}' if not isinstance(el, (str, bytes))
426+
else '\'{}\'']
427+
val_format = ', '.join(items_format).format
424428
jobstring += '[{}];...\n'.format(val_format(*val))
425429
elif isinstance(val, (str, bytes)):
426430
jobstring += '\'{}\';...\n'.format(val)

0 commit comments

Comments
 (0)