tests: Update for _io/_collections module having been renamed.
This commit is contained in:
parent
621c644205
commit
8c35f3979c
|
@ -5,7 +5,7 @@
|
|||
try:
|
||||
from collections import namedtuple
|
||||
except ImportError:
|
||||
from _collections import namedtuple
|
||||
from ucollections import namedtuple
|
||||
|
||||
_DefragResultBase = namedtuple('DefragResult', [ 'foo', 'bar' ])
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import bench
|
||||
from _collections import namedtuple
|
||||
from ucollections import namedtuple
|
||||
|
||||
T = namedtuple("Tup", ["num", "bar"])
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import bench
|
||||
from _collections import namedtuple
|
||||
from ucollections import namedtuple
|
||||
|
||||
T = namedtuple("Tup", ["foo1", "foo2", "foo3", "foo4", "num"])
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import _io as io
|
||||
import uio as io
|
||||
|
||||
try:
|
||||
io.BytesIO
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import _io as io
|
||||
import uio as io
|
||||
|
||||
a = io.StringIO()
|
||||
print('io.StringIO' in repr(a))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import _io as io
|
||||
import uio as io
|
||||
|
||||
# test __enter__/__exit__
|
||||
with io.StringIO() as b:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# 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
|
||||
|
|
Loading…
Reference in New Issue