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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy