ソースを参照

Merge pull request #6986 from rumpl/fix-unit-test-close-fd

Cleanup all open files
Jean-Christophe Sirot 6 年 前
コミット
cfc48f2c13
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):