summaryrefslogtreecommitdiffstats
path: root/test/Alias/Depends.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/Alias/Depends.py')
-rw-r--r--test/Alias/Depends.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Alias/Depends.py b/test/Alias/Depends.py
index a1129e4..715374c 100644
--- a/test/Alias/Depends.py
+++ b/test/Alias/Depends.py
@@ -37,7 +37,8 @@ test.subdir('sub1', 'sub2')
test.write('build.py', r"""
import sys
-open(sys.argv[1], 'wb').write(open(sys.argv[2], 'rb').read())
+with open(sys.argv[1], 'wb') as f, open(sys.argv[2], 'rb') as ifp:
+ f.write(ifp.read())
sys.exit(0)
""")