1# Creating BytesIO from immutable object should not immediately
2# copy its content.
3try:
4    import uio
5    import micropython
6
7    micropython.mem_total
8except (ImportError, AttributeError):
9    print("SKIP")
10    raise SystemExit
11
12
13data = b"1234" * 256
14
15before = micropython.mem_total()
16
17buf = uio.BytesIO(data)
18
19after = micropython.mem_total()
20
21print(after - before < len(data))
22