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

pull/2038/head
Paul Sokolovsky 2016-05-02 14:15:11 +03:00
rodzic 621c644205
commit 8c35f3979c
10 zmienionych plików z 10 dodań i 10 usunięć

Wyświetl plik

@ -5,7 +5,7 @@
try:
from collections import namedtuple
except ImportError:
from _collections import namedtuple
from ucollections import namedtuple
_DefragResultBase = namedtuple('DefragResult', [ 'foo', 'bar' ])

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -1,5 +1,5 @@
import bench
from _collections import namedtuple
from ucollections import namedtuple
T = namedtuple("Tup", ["num", "bar"])

Wyświetl plik

@ -1,5 +1,5 @@
import bench
from _collections import namedtuple
from ucollections import namedtuple
T = namedtuple("Tup", ["foo1", "foo2", "foo3", "foo4", "num"])

Wyświetl plik

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

Wyświetl plik

@ -1,4 +1,4 @@
import _io as io
import uio as io
a = io.StringIO()
print('io.StringIO' in repr(a))

Wyświetl plik

@ -1,4 +1,4 @@
import _io as io
import uio as io
# test __enter__/__exit__
with io.StringIO() as b:

Wyświetl plik

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

Wyświetl plik

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