File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
nipype/interfaces/nitime/tests Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
2
2
# vi: set ft=python sts=4 ts=4 sw=4 et:
3
+ import os
3
4
import tempfile
4
5
5
6
import numpy as np
9
10
import nipype .interfaces .nitime as nitime
10
11
11
12
no_nitime = not nitime .analysis .have_nitime
13
+ display_available = 'DISPLAY' in os .environ and os .environ ['DISPLAY' ]
12
14
13
15
@skipif (no_nitime )
14
16
def test_read_csv ():
@@ -35,8 +37,9 @@ def test_coherence_analysis():
35
37
CA = nitime .CoherenceAnalyzer ()
36
38
CA .inputs .TR = 1.89
37
39
CA .inputs .in_file = example_data ('fmri_timeseries.csv' )
38
- tmp_png = tempfile .mkstemp (suffix = '.png' )[1 ]
39
- CA .inputs .output_figure_file = tmp_png
40
+ if display_available :
41
+ tmp_png = tempfile .mkstemp (suffix = '.png' )[1 ]
42
+ CA .inputs .output_figure_file = tmp_png
40
43
tmp_csv = tempfile .mkstemp (suffix = '.csv' )[1 ]
41
44
CA .inputs .output_csv_file = tmp_csv
42
45
You can’t perform that action at this time.
0 commit comments