소스 검색

Cleanup all open files

If the fd is not closed the cleanup will fail on windows.

Signed-off-by: Djordje Lukic <[email protected]>
Djordje Lukic 6 년 전
부모
커밋
f8142a899c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      tests/unit/project_test.py

+ 2 - 1
tests/unit/project_test.py

@@ -880,7 +880,8 @@ class ProjectTest(unittest.TestCase):
         service = 'foo'
         secret_source = 'bar'
 
-        _, filename_path = tempfile.mkstemp()
+        fd, filename_path = tempfile.mkstemp()
+        os.close(fd)
         self.addCleanup(os.remove, filename_path)
 
         def mock_get(key):