Patchwork [5,of,6] test-fastannotate: close fd before unlinking to keep Windows happy

login
register
mail settings
Submitter Matt Harbison
Date Aug. 22, 2018, 2:55 a.m.
Message ID <78044da31ab9bc0cbd07.1534906526@Envy>
Download mbox | patch
Permalink /patch/33962/
State Accepted
Headers show

Comments

Matt Harbison - Aug. 22, 2018, 2:55 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1534905272 14400
#      Tue Aug 21 22:34:32 2018 -0400
# Node ID 78044da31ab9bc0cbd0793bf9bc587271eb74bbf
# Parent  2e2a52088a0ce8370fea5a8a132edbb041ba5218
test-fastannotate: close fd before unlinking to keep Windows happy

Patch

diff --git a/tests/test-fastannotate-revmap.py b/tests/test-fastannotate-revmap.py
--- a/tests/test-fastannotate-revmap.py
+++ b/tests/test-fastannotate-revmap.py
@@ -11,8 +11,8 @@  def genhsh(i):
 
 def gettemppath():
     fd, path = tempfile.mkstemp()
+    os.close(fd)
     os.unlink(path)
-    os.close(fd)
     return path
 
 def ensure(condition):