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

This commit is contained in:
Paul Sokolovsky 2016-05-02 14:15:11 +03:00
parent 621c644205
commit 8c35f3979c
10 changed files with 10 additions and 10 deletions

View File

@ -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' ])

View File

@ -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

View File

@ -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

View File

@ -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"])

View File

@ -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"])

View File

@ -1,4 +1,4 @@
import _io as io import uio as io
try: try:
io.BytesIO io.BytesIO

View File

@ -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))

View File

@ -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:

View File

@ -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

View File

@ -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