summaryrefslogtreecommitdiffstats
path: root/test/implicit/asynchronous-modification.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/implicit/asynchronous-modification.py')
-rw-r--r--test/implicit/asynchronous-modification.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/implicit/asynchronous-modification.py b/test/implicit/asynchronous-modification.py
index 90a6392..1a409ae 100644
--- a/test/implicit/asynchronous-modification.py
+++ b/test/implicit/asynchronous-modification.py
@@ -55,8 +55,10 @@ test.write(['hdr.h'], """\
""")
test.write(['mod.py'], """\
-open('mod', 'w').write(open('mod.py', 'r').read())
-open('hdr.h', 'w').write("/* modified */\\n")
+with open('mod', 'w') as f, open('mod.py', 'r') as ifp:
+ f.write(ifp.read())
+with open('hdr.h', 'w') as f:
+ f.write("/* modified */\\n")
""")
test.write(['one.c'], """\