Skip to content

Commit 21f2ef7

Browse files
tcloseeffigies
andauthored
Update pydra/utils/tests/utils.py
Co-authored-by: Chris Markiewicz <[email protected]>
1 parent 60f4604 commit 21f2ef7

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pydra/utils/tests/utils.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ def Concatenate(
123123
"""
124124
if out_file is None:
125125
out_file = Path("out_file.txt").absolute()
126-
contents = []
127-
for _ in range(duplicates):
128-
for fname in (in_file1, in_file2):
129-
with open(fname) as f:
130-
contents.append(f.read())
131-
with open(out_file, "w") as f:
132-
f.write("\n".join(contents))
126+
contents = [Path(fname).read_text() for fname in (in_file1, in_file2)]
127+
out_file.write_text("\n".join(contents * duplicates))
133128
return out_file

0 commit comments

Comments
 (0)