summaryrefslogtreecommitdiff
path: root/gitdb/test
diff options
context:
space:
mode:
authorstuertz <js@contact.de>2017-03-27 11:20:48 +0200
committerstuertz <js@contact.de>2017-03-27 11:20:48 +0200
commitd6c097eaf759dabfd3c42b55958962b6e9a05063 (patch)
tree114bc165a72cbba63d87b5a5c082656945a77800 /gitdb/test
parent060e5ea18b010e4d8441a5cfad699aba69593c72 (diff)
downloadgitdb-d6c097eaf759dabfd3c42b55958962b6e9a05063.tar.gz
close smmap handles, to be able to delete files / trees in process (req. for windows)
Diffstat (limited to 'gitdb/test')
-rw-r--r--gitdb/test/test_pack.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gitdb/test/test_pack.py b/gitdb/test/test_pack.py
index 6e31363..24e2a31 100644
--- a/gitdb/test/test_pack.py
+++ b/gitdb/test/test_pack.py
@@ -217,10 +217,11 @@ class TestPack(TestBase):
assert os.path.getsize(ppath) > 100
# verify pack
- pf = PackFile(ppath) # FIXME: Leaks file-pointer(s)!
+ pf = PackFile(ppath)
assert pf.size() == len(pack_objs)
assert pf.version() == PackFile.pack_version_default
assert pf.checksum() == pack_sha
+ pf.close()
# verify index
if ipath is not None:
@@ -231,6 +232,7 @@ class TestPack(TestBase):
assert idx.packfile_checksum() == pack_sha
assert idx.indexfile_checksum() == index_sha
assert idx.size() == len(pack_objs)
+ idx.close()
# END verify files exist
# END for each packpath, indexpath pair
@@ -245,7 +247,8 @@ class TestPack(TestBase):
# END for each crc mode
# END for each info
assert count == len(pack_objs)
-
+ entity.close()
+
def test_pack_64(self):
# TODO: hex-edit a pack helping us to verify that we can handle 64 byte offsets
# of course without really needing such a huge pack