Skip to content

Commit

Permalink
tests: close tempfile before attempting to delete (#1586)
Browse files Browse the repository at this point in the history
  • Loading branch information
sriram-mv committed Nov 23, 2019
1 parent 0b9d5bd commit f7b7e55
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/unit/lib/utils/test_file_utils.py
Expand Up @@ -8,6 +8,7 @@
class TestFile(TestCase):
def test_file_remove(self):
_file = tempfile.NamedTemporaryFile(delete=False)
_file.close()
remove(_file.name)
self.assertFalse(os.path.exists(_file.name))
# No Exception thrown
Expand Down

0 comments on commit f7b7e55

Please sign in to comment.