summaryrefslogtreecommitdiff
path: root/gitdb/test/test_pack.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitdb/test/test_pack.py')
-rw-r--r--gitdb/test/test_pack.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/gitdb/test/test_pack.py b/gitdb/test/test_pack.py
index 601c0ea..6e31363 100644
--- a/gitdb/test/test_pack.py
+++ b/gitdb/test/test_pack.py
@@ -188,7 +188,8 @@ class TestPack(TestBase):
# pack writing - write all packs into one
# index path can be None
- pack_path = tempfile.mktemp('', "pack", rw_dir)
+ pack_path1 = tempfile.mktemp('', "pack1", rw_dir)
+ pack_path2 = tempfile.mktemp('', "pack2", rw_dir)
index_path = tempfile.mktemp('', 'index', rw_dir)
iteration = 0
@@ -196,7 +197,9 @@ class TestPack(TestBase):
for obj in pack_objs:
obj.stream.seek(0)
# END utility
- for ppath, ipath, num_obj in zip((pack_path, ) * 2, (index_path, None), (len(pack_objs), None)):
+ for ppath, ipath, num_obj in zip((pack_path1, pack_path2),
+ (index_path, None),
+ (len(pack_objs), None)):
iwrite = None
if ipath:
ifile = open(ipath, 'wb')
@@ -214,7 +217,7 @@ class TestPack(TestBase):
assert os.path.getsize(ppath) > 100
# verify pack
- pf = PackFile(ppath)
+ pf = PackFile(ppath) # FIXME: Leaks file-pointer(s)!
assert pf.size() == len(pack_objs)
assert pf.version() == PackFile.pack_version_default
assert pf.checksum() == pack_sha