8000 tests/extmod/btree1: Tests against in-memory DB (using io.BytesIO). · jmax315/circuitpython@617bda2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 617bda2

Browse files
committed
tests/extmod/btree1: Tests against in-memory DB (using io.BytesIO).
1 parent aac9e8c commit 617bda2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/extmod/btree1.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
try:
22
import btree
3+
import uio
34
except ImportError:
45
print("SKIP")
56
import sys
67
sys.exit()
78

8-
db = btree.open(None)
9+
#f = open("_test.db", "w+b")
10+
f = uio.BytesIO()
11+
db = btree.open(f)
12+
913
db[b"foo3"] = b"bar3"
1014
db[b"foo1"] = b"bar1"
1115
db[b"foo2"] = b"bar2"
@@ -59,3 +63,4 @@
5963
print(k)
6064

6165
db.close()
66+
f.close()

0 commit comments

Comments
 (0)
0