summaryrefslogtreecommitdiff
path: root/gitdb/test/db/lib.py
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/db/lib.py
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/db/lib.py')
-rw-r--r--gitdb/test/db/lib.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gitdb/test/db/lib.py b/gitdb/test/db/lib.py
index 528bcc1..d7365ea 100644
--- a/gitdb/test/db/lib.py
+++ b/gitdb/test/db/lib.py
@@ -39,7 +39,7 @@ class TestDBBase(TestBase):
# data
two_lines = b'1234\nhello world'
- all_data = (two_lines, )
+ all_data = (two_lines,)
def _assert_object_writing_simple(self, db):
# write a bunch of objects and query their streams and info
@@ -56,10 +56,10 @@ class TestDBBase(TestBase):
assert isinstance(info, OInfo)
assert info.type == istream.type and info.size == istream.size
- stream = db.stream(istream.binsha)
- assert isinstance(stream, OStream)
- assert stream.binsha == info.binsha and stream.type == info.type
- assert stream.read() == data
+ with db.stream(istream.binsha) as stream:
+ assert isinstance(stream, OStream)
+ assert stream.binsha == info.binsha and stream.type == info.type
+ assert stream.read() == data
# END for each item
assert db.size() == null_objs + ni