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

Cleanup all open files
This commit is contained in:
Jean-Christophe Sirot 2019-10-28 16:07:18 +01:00 committed by GitHub
commit cfc48f2c13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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