Commit 8c35f397 authored by Paul Sokolovsky's avatar Paul Sokolovsky

tests: Update for _io/_collections module having been renamed.

parent 621c6442
......@@ -5,7 +5,7 @@
try:
from collections import namedtuple
except ImportError:
from _collections import namedtuple
from ucollections import namedtuple
_DefragResultBase = namedtuple('DefragResult', [ 'foo', 'bar' ])
......
try:
from collections import namedtuple
except ImportError:
from _collections import namedtuple
from ucollections import namedtuple
T = namedtuple("Tup", ["foo", "bar"])
# CPython prints fully qualified name, what we don't bother to do so far
......
......@@ -2,7 +2,7 @@ try:
from collections import OrderedDict
except ImportError:
try:
from _collections import OrderedDict
from ucollections import OrderedDict
except ImportError:
print("SKIP")
import sys
......
import bench
from _collections import namedtuple
from ucollections import namedtuple
T = namedtuple("Tup", ["num", "bar"])
......
import bench
from _collections import namedtuple
from ucollections import namedtuple
T = namedtuple("Tup", ["foo1", "foo2", "foo3", "foo4", "num"])
......
import _io as io
import uio as io
try:
io.BytesIO
......
import _io as io
import uio as io
a = io.StringIO()
print('io.StringIO' in repr(a))
......
import _io as io
import uio as io
# test __enter__/__exit__
with io.StringIO() as b:
......
import _io as io # uPy does not have io module builtin
import uio as io # uPy does not have io module builtin
import sys
if hasattr(sys, 'print_exception'):
print_exception = sys.print_exception
......
# This tests that printing recursive data structure doesn't lead to segfault.
import _io as io
import uio as io
l = [1, 2, 3, None]
l[-1] = l
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment