tests/extmod/btree1: Tests against in-memory DB (using io.BytesIO).
This commit is contained in:
parent
aac9e8cfa3
commit
617bda27e9
@ -1,11 +1,15 @@
|
||||
try:
|
||||
import btree
|
||||
import uio
|
||||
except ImportError:
|
||||
print("SKIP")
|
||||
import sys
|
||||
sys.exit()
|
||||
|
||||
db = btree.open(None)
|
||||
#f = open("_test.db", "w+b")
|
||||
f = uio.BytesIO()
|
||||
db = btree.open(f)
|
||||
|
||||
db[b"foo3"] = b"bar3"
|
||||
db[b"foo1"] = b"bar1"
|
||||
db[b"foo2"] = b"bar2"
|
||||
@ -59,3 +63,4 @@ for k in db:
|
||||
print(k)
|
||||
|
||||
db.close()
|
||||
f.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user