test-commandserver: explicitly close opened file stable
authorIdan Kamara <idankk86@gmail.com>
Fri, 15 Jul 2011 16:28:09 +0300
branchstable
changeset 14880 5233df79deed
parent 14877 29d324c2bc93
child 14881 2e54387976d4
test-commandserver: explicitly close opened file
tests/test-commandserver.py
--- a/tests/test-commandserver.py	Wed Jul 13 19:30:09 2011 -0500
+++ b/tests/test-commandserver.py	Fri Jul 15 16:28:09 2011 +0300
@@ -124,7 +124,9 @@
     """ check that --cwd doesn't persist between requests """
     readchannel(server)
     os.mkdir('foo')
-    open('foo/bar', 'w').write('a')
+    f = open('foo/bar', 'w')
+    f.write('a')
+    f.close()
     runcommand(server, ['--cwd', 'foo', 'st', 'bar'])
     runcommand(server, ['st', 'foo/bar'])
     os.remove('foo/bar')