diff --git a/tests/basics/class_store_class.py b/tests/basics/class_store_class.py index 8f3e542d11..504f460a7d 100644 --- a/tests/basics/class_store_class.py +++ b/tests/basics/class_store_class.py @@ -5,11 +5,8 @@ try: from collections import namedtuple except ImportError: - try: - from ucollections import namedtuple - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit import skip_if skip_if.no_cpython_compat() diff --git a/tests/basics/namedtuple1.py b/tests/basics/namedtuple1.py index 1b176b2321..63d9eddd4e 100644 --- a/tests/basics/namedtuple1.py +++ b/tests/basics/namedtuple1.py @@ -1,8 +1,5 @@ try: - try: - from collections import namedtuple - except ImportError: - from ucollections import namedtuple + from collections import namedtuple except ImportError: print("SKIP") raise SystemExit diff --git a/tests/basics/namedtuple1_cpython_compat.py b/tests/basics/namedtuple1_cpython_compat.py index a1b852d900..061ae94e58 100644 --- a/tests/basics/namedtuple1_cpython_compat.py +++ b/tests/basics/namedtuple1_cpython_compat.py @@ -2,10 +2,7 @@ import skip_if skip_if.no_cpython_compat() try: - try: - from collections import namedtuple - except ImportError: - from ucollections import namedtuple + from collections import namedtuple except ImportError: skip_if.skip() diff --git a/tests/basics/ordereddict1.py b/tests/basics/ordereddict1.py index d1633f0bb0..9c62b2d623 100644 --- a/tests/basics/ordereddict1.py +++ b/tests/basics/ordereddict1.py @@ -1,11 +1,8 @@ try: from collections import OrderedDict except ImportError: - try: - from ucollections import OrderedDict - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit d = OrderedDict([(10, 20), ("b", 100), (1, 2)]) print(len(d)) diff --git a/tests/basics/ordereddict_eq.py b/tests/basics/ordereddict_eq.py index c69daf8802..e103c867e2 100644 --- a/tests/basics/ordereddict_eq.py +++ b/tests/basics/ordereddict_eq.py @@ -1,11 +1,8 @@ try: from collections import OrderedDict except ImportError: - try: - from ucollections import OrderedDict - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit x = OrderedDict() y = OrderedDict() diff --git a/tests/bench/var-8-namedtuple-1st.py b/tests/bench/var-8-namedtuple-1st.py index d862480a51..90ae7209d8 100644 --- a/tests/bench/var-8-namedtuple-1st.py +++ b/tests/bench/var-8-namedtuple-1st.py @@ -1,5 +1,5 @@ import bench -from ucollections import namedtuple +from collections 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 0bcf661803..0d5789d2ed 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 ucollections import namedtuple +from collections import namedtuple T = namedtuple("Tup", ["foo1", "foo2", "foo3", "foo4", "num"]) diff --git a/tests/skip_if.py b/tests/skip_if.py index 8d0ed8f214..7d6c5b2075 100644 --- a/tests/skip_if.py +++ b/tests/skip_if.py @@ -68,10 +68,7 @@ def board_not_in(*board): def no_cpython_compat(): try: - try: - from collections import namedtuple - except ImportError: - from ucollections import namedtuple + from collections import namedtuple except ImportError: skip() try: