Skip to content

Commit 670934e

Browse files
author
Ben Cipollini
committed
BF: writelines needs an iterable; add [] around string.
1 parent 55ffbdc commit 670934e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nipype/interfaces/tests/test_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def setup_file():
7272
#global tmp_infile, tmp_dir
7373
tmp_dir = tempfile.mkdtemp()
7474
tmp_infile = os.path.join(tmp_dir, 'foo.txt')
75-
open(tmp_infile, 'w').writelines('123456789')
75+
with open(tmp_infile, 'w'):
76+
fp.writelines(['123456789'])
7677
return tmp_infile
7778

7879
def teardown_file(tmp_dir):

0 commit comments

Comments
 (0)