[PATCH STABLE] test-commandserver: explicitly close opened file
Idan Kamara
idankk86 at gmail.com
Fri Jul 15 08:28:38 CDT 2011
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1310736489 -10800
# Node ID af44baded21bcd876bb7d12a0d68a6db75f98c55
# Parent 743cc738f7040f2f6daa574deb2e2b8d9b5b03a4
test-commandserver: explicitly close opened file
diff -r 743cc738f704 -r af44baded21b tests/test-commandserver.py
--- a/tests/test-commandserver.py Thu Jul 14 12:39:39 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')
More information about the Mercurial-devel
mailing list