Skip to content
Snippets Groups Projects
Commit a8e919ab authored by Nicolas Dandrimont's avatar Nicolas Dandrimont
Browse files

test_hashutil: remove temporary file after test

parent c790b85f
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
# See top-level LICENSE file for more information
import io
import os
import tempfile
import unittest
......@@ -92,8 +93,9 @@ class Hashutil(unittest.TestCase):
def hash_path(self):
with tempfile.NamedTemporaryFile(delete=False) as f:
f.write(self.data)
f.close()
hashes = hashutil.hash_path(f.name)
hashes = hashutil.hash_path(f.name)
os.remove(f.name)
self.checksums['length'] = len(self.data)
self.assertEquals(self.checksums, hashes)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment