Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Properly scope DB lifetime in iterator test

  • Loading branch information...
commit 726ad95b348d9bc17d60f291ae4c3302726b8ee4 1 parent 86728dc
@wbolster authored
Showing with 12 additions and 12 deletions.
  1. +12 −12 test/test_plyvel.py
View
24 test/test_plyvel.py
@@ -316,22 +316,22 @@ def test_iterator_return():
with tmp_db('iteration') as db:
db.put(b'key', b'value')
- for key, value in db:
- assert_equal(key, b'key')
- assert_equal(value, b'value')
+ for key, value in db:
+ assert_equal(key, b'key')
+ assert_equal(value, b'value')
- for key, value in db.iterator():
- assert_equal(key, b'key')
- assert_equal(value, b'value')
+ for key, value in db.iterator():
+ assert_equal(key, b'key')
+ assert_equal(value, b'value')
- for key in db.iterator(include_value=False):
- assert_equal(key, b'key')
+ for key in db.iterator(include_value=False):
+ assert_equal(key, b'key')
- for value in db.iterator(include_key=False):
- assert_equal(value, b'value')
+ for value in db.iterator(include_key=False):
+ assert_equal(value, b'value')
- for ret in db.iterator(include_key=False, include_value=False):
- assert_is_none(ret)
+ for ret in db.iterator(include_key=False, include_value=False):
+ assert_is_none(ret)
@nottest
Please sign in to comment.
Something went wrong with that request. Please try again.