From 8c35f3979c38bc8a29a22e7a61d33f87ff856124 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 2 May 2016 14:15:11 +0300 Subject: [PATCH] tests: Update for _io/_collections module having been renamed. --- tests/basics/class_store_class.py | 2 +- tests/basics/namedtuple1.py | 2 +- tests/basics/ordereddict1.py | 2 +- tests/bench/var-8-namedtuple-1st.py | 2 +- tests/bench/var-8.1-namedtuple-5th.py | 2 +- tests/io/buffered_writer.py | 2 +- tests/io/stringio1.py | 2 +- tests/io/stringio_with.py | 2 +- tests/misc/print_exception.py | 2 +- tests/misc/recursive_data.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/basics/class_store_class.py b/tests/basics/class_store_class.py index 09a8e8bc4d..10b94d3c6a 100644 --- a/tests/basics/class_store_class.py +++ b/tests/basics/class_store_class.py @@ -5,7 +5,7 @@ try: from collections import namedtuple except ImportError: - from _collections import namedtuple + from ucollections import namedtuple _DefragResultBase = namedtuple('DefragResult', [ 'foo', 'bar' ]) diff --git a/tests/basics/namedtuple1.py b/tests/basics/namedtuple1.py index ae795ba6de..dfbb79f2eb 100644 --- a/tests/basics/namedtuple1.py +++ b/tests/basics/namedtuple1.py @@ -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 diff --git a/tests/basics/ordereddict1.py b/tests/basics/ordereddict1.py index 26d0effd53..5e8b2413b6 100644 --- a/tests/basics/ordereddict1.py +++ b/tests/basics/ordereddict1.py @@ -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 diff --git a/tests/bench/var-8-namedtuple-1st.py b/tests/bench/var-8-namedtuple-1st.py index f3f36f415a..d862480a51 100644 --- a/tests/bench/var-8-namedtuple-1st.py +++ b/tests/bench/var-8-namedtuple-1st.py @@ -1,5 +1,5 @@ import bench -from _collections import namedtuple +from ucollections import namedtuple T = namedtuple("Tup", ["num", "bar"]) diff --git a/tests/bench/var-8.1-namedtuple-5th.py b/tests/bench/var-8.1-namedtuple-5th.py index b6bdc8d795..0bcf661803 100644 --- a/tests/bench/var-8.1-namedtuple-5th.py +++ b/tests/bench/var-8.1-namedtuple-5th.py @@ -1,5 +1,5 @@ import bench -from _collections import namedtuple +from ucollections import namedtuple T = namedtuple("Tup", ["foo1", "foo2", "foo3", "foo4", "num"]) diff --git a/tests/io/buffered_writer.py b/tests/io/buffered_writer.py index 0fe8a77309..afeaa839c1 100644 --- a/tests/io/buffered_writer.py +++ b/tests/io/buffered_writer.py @@ -1,4 +1,4 @@ -import _io as io +import uio as io try: io.BytesIO diff --git a/tests/io/stringio1.py b/tests/io/stringio1.py index 22f561f299..a224c5b0c4 100644 --- a/tests/io/stringio1.py +++ b/tests/io/stringio1.py @@ -1,4 +1,4 @@ -import _io as io +import uio as io a = io.StringIO() print('io.StringIO' in repr(a)) diff --git a/tests/io/stringio_with.py b/tests/io/stringio_with.py index becb564dfd..6dc48c8932 100644 --- a/tests/io/stringio_with.py +++ b/tests/io/stringio_with.py @@ -1,4 +1,4 @@ -import _io as io +import uio as io # test __enter__/__exit__ with io.StringIO() as b: diff --git a/tests/misc/print_exception.py b/tests/misc/print_exception.py index 1d3ca4cf46..80f7f44166 100644 --- a/tests/misc/print_exception.py +++ b/tests/misc/print_exception.py @@ -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 diff --git a/tests/misc/recursive_data.py b/tests/misc/recursive_data.py index 53fb30f9ff..0de93acb89 100644 --- a/tests/misc/recursive_data.py +++ b/tests/misc/recursive_data.py @@ -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