Explorar el Código

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

Cleanup all open files
Jean-Christophe Sirot hace 6 años
padre
commit
cfc48f2c13
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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):