summaryrefslogtreecommitdiff
path: root/gitdb/test/performance
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-24 17:32:06 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-10-24 18:26:06 +0200
commit534c9bbe320f638153f9ffd79b79fa124b544d0f (patch)
tree731c56781e2b0bf367919ed8a0ef7e0a61f6a200 /gitdb/test/performance
parent08b1f5f4fdc95d4ce24aa33ec82ac0d9723b8a02 (diff)
downloadgitdb-2.1.0.dev1.tar.gz
fix(win): FIX and HIDE 2 win-errors remainingv2.1.0.dev1
+ File-in-use errors were fixed with `gitdb.util.mman.collect()`! + This call is disabled `gitdb.util.HIDE_WINDOWS_KNOWN_ERRORS == False`. + Depend on latest smmp `v2.1.0.dev1` tag
Diffstat (limited to 'gitdb/test/performance')
-rw-r--r--gitdb/test/performance/test_pack_streaming.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gitdb/test/performance/test_pack_streaming.py b/gitdb/test/performance/test_pack_streaming.py
index 76f0f4a..21a7532 100644
--- a/gitdb/test/performance/test_pack_streaming.py
+++ b/gitdb/test/performance/test_pack_streaming.py
@@ -46,7 +46,8 @@ class TestPackStreamingPerformance(TestBigRepoR):
st = time()
for sha in pdb.sha_iter():
count += 1
- pdb.stream(sha)
+ with pdb.stream(sha):
+ pass
if count == ni:
break
# END gather objects for pack-writing
@@ -55,6 +56,8 @@ class TestPackStreamingPerformance(TestBigRepoR):
(ni, elapsed, ni / (elapsed or 1)), file=sys.stderr)
st = time()
+ ## We are leaking files here, but we don't care...
+ # and we need a `contextlib.ExitStack` to safely close them.
PackEntity.write_pack((pdb.stream(sha) for sha in pdb.sha_iter()), ostream.write, object_count=ni)
elapsed = time() - st
total_kb = ostream.bytes_written() / 1000