فهرست منبع

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):