def test_safe_delete_file(self):
    temp_file = tempfile.NamedTemporaryFile()
    temp_file.name = 'some_file.txt'
    with open('some_file.txt', 'w') as tmp:
        tmp.write('Some content.')
    self.assertTrue(os.path.isfile('some_file.txt'))
    build.safe_delete_file('some_file.txt')
    self.assertFalse(os.path.isfile('some_file.txt'))
def test_safe_delete_file(self):
    temp_file = tempfile.NamedTemporaryFile()
    temp_file.name = 'some_file.txt'
    with open('some_file.txt', 'w') as tmp:
        tmp.write('Some content.')
    self.assertTrue(os.path.isfile('some_file.txt'))
    build.safe_delete_file('some_file.txt')
    self.assertFalse(os.path.isfile('some_file.txt'))