tests: Update for _io/_collections module having been renamed.
This commit is contained in:
parent
621c644205
commit
8c35f3979c
|
@ -5,7 +5,7 @@
|
||||||
try:
|
try:
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from _collections import namedtuple
|
from ucollections import namedtuple
|
||||||
|
|
||||||
_DefragResultBase = namedtuple('DefragResult', [ 'foo', 'bar' ])
|
_DefragResultBase = namedtuple('DefragResult', [ 'foo', 'bar' ])
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
try:
|
try:
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from _collections import namedtuple
|
from ucollections import namedtuple
|
||||||
|
|
||||||
T = namedtuple("Tup", ["foo", "bar"])
|
T = namedtuple("Tup", ["foo", "bar"])
|
||||||
# CPython prints fully qualified name, what we don't bother to do so far
|
# CPython prints fully qualified name, what we don't bother to do so far
|
||||||
|
|
|
@ -2,7 +2,7 @@ try:
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from _collections import OrderedDict
|
from ucollections import OrderedDict
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("SKIP")
|
print("SKIP")
|
||||||
import sys
|
import sys
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import bench
|
import bench
|
||||||
from _collections import namedtuple
|
from ucollections import namedtuple
|
||||||
|
|
||||||
T = namedtuple("Tup", ["num", "bar"])
|
T = namedtuple("Tup", ["num", "bar"])
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import bench
|
import bench
|
||||||
from _collections import namedtuple
|
from ucollections import namedtuple
|
||||||
|
|
||||||
T = namedtuple("Tup", ["foo1", "foo2", "foo3", "foo4", "num"])
|
T = namedtuple("Tup", ["foo1", "foo2", "foo3", "foo4", "num"])
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import _io as io
|
import uio as io
|
||||||
|
|
||||||
try:
|
try:
|
||||||
io.BytesIO
|
io.BytesIO
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import _io as io
|
import uio as io
|
||||||
|
|
||||||
a = io.StringIO()
|
a = io.StringIO()
|
||||||
print('io.StringIO' in repr(a))
|
print('io.StringIO' in repr(a))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import _io as io
|
import uio as io
|
||||||
|
|
||||||
# test __enter__/__exit__
|
# test __enter__/__exit__
|
||||||
with io.StringIO() as b:
|
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
|
import sys
|
||||||
if hasattr(sys, 'print_exception'):
|
if hasattr(sys, 'print_exception'):
|
||||||
print_exception = sys.print_exception
|
print_exception = sys.print_exception
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# This tests that printing recursive data structure doesn't lead to segfault.
|
# 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, 2, 3, None]
|
||||||
l[-1] = l
|
l[-1] = l
|
||||||
|
|
Loading…
Reference in New Issue