We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60f4604 commit 21f2ef7Copy full SHA for 21f2ef7
pydra/utils/tests/utils.py
@@ -123,11 +123,6 @@ def Concatenate(
123
"""
124
if out_file is None:
125
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))
+ contents = [Path(fname).read_text() for fname in (in_file1, in_file2)]
+ out_file.write_text("\n".join(contents * duplicates))
133
return out_file
0 commit comments