From f8142a899c0dd8ea4f2ff227a0dd868a91f6e11d Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Mon, 28 Oct 2019 15:33:32 +0100 Subject: [PATCH] Cleanup all open files If the fd is not closed the cleanup will fail on windows. Signed-off-by: Djordje Lukic --- tests/unit/project_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/project_test.py b/tests/unit/project_test.py index de16febf5..6391fac86 100644 --- a/tests/unit/project_test.py +++ b/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):