diff options
| author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-24 17:32:06 +0200 |
|---|---|---|
| committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-24 18:26:06 +0200 |
| commit | 534c9bbe320f638153f9ffd79b79fa124b544d0f (patch) | |
| tree | 731c56781e2b0bf367919ed8a0ef7e0a61f6a200 /gitdb/test/test_stream.py | |
| parent | 08b1f5f4fdc95d4ce24aa33ec82ac0d9723b8a02 (diff) | |
| download | gitdb-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/test_stream.py')
| -rw-r--r-- | gitdb/test/test_stream.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gitdb/test/test_stream.py b/gitdb/test/test_stream.py index 7d3eeae..9bc3ca5 100644 --- a/gitdb/test/test_stream.py +++ b/gitdb/test/test_stream.py @@ -154,13 +154,12 @@ class TestStream(TestBase): mdb = MemoryDB() for sha in (b'888401851f15db0eed60eb1bc29dec5ddcace911', b'7bb839852ed5e3a069966281bb08d50012fb309b',): - ostream = odb.stream(hex_to_bin(sha)) - - # if there is a bug, we will be missing one byte exactly ! - data = ostream.read() - assert len(data) == ostream.size - - # Putting it back in should yield nothing new - after all, we have - dump = mdb.store(IStream(ostream.type, ostream.size, BytesIO(data))) - assert dump.hexsha == sha + with odb.stream(hex_to_bin(sha)) as ostream: + # if there is a bug, we will be missing one byte exactly ! + data = ostream.read() + assert len(data) == ostream.size + + # Putting it back in should yield nothing new - after all, we have + dump = mdb.store(IStream(ostream.type, ostream.size, BytesIO(data))) + assert dump.hexsha == sha # end for each loose object sha to test |
