Updated tests; removed try/catch for ucollections

This commit is contained in:
bildzeitung 2018-05-14 14:43:34 -04:00
parent a8cc4a1a62
commit bf26ffbf56
8 changed files with 11 additions and 29 deletions

View File

@ -5,11 +5,8 @@
try: try:
from collections import namedtuple from collections import namedtuple
except ImportError: except ImportError:
try: print("SKIP")
from ucollections import namedtuple raise SystemExit
except ImportError:
print("SKIP")
raise SystemExit
import skip_if import skip_if
skip_if.no_cpython_compat() skip_if.no_cpython_compat()

View File

@ -1,8 +1,5 @@
try: try:
try: from collections import namedtuple
from collections import namedtuple
except ImportError:
from ucollections import namedtuple
except ImportError: except ImportError:
print("SKIP") print("SKIP")
raise SystemExit raise SystemExit

View File

@ -2,10 +2,7 @@ import skip_if
skip_if.no_cpython_compat() skip_if.no_cpython_compat()
try: try:
try: from collections import namedtuple
from collections import namedtuple
except ImportError:
from ucollections import namedtuple
except ImportError: except ImportError:
skip_if.skip() skip_if.skip()

View File

@ -1,11 +1,8 @@
try: try:
from collections import OrderedDict from collections import OrderedDict
except ImportError: except ImportError:
try: print("SKIP")
from ucollections import OrderedDict raise SystemExit
except ImportError:
print("SKIP")
raise SystemExit
d = OrderedDict([(10, 20), ("b", 100), (1, 2)]) d = OrderedDict([(10, 20), ("b", 100), (1, 2)])
print(len(d)) print(len(d))

View File

@ -1,11 +1,8 @@
try: try:
from collections import OrderedDict from collections import OrderedDict
except ImportError: except ImportError:
try: print("SKIP")
from ucollections import OrderedDict raise SystemExit
except ImportError:
print("SKIP")
raise SystemExit
x = OrderedDict() x = OrderedDict()
y = OrderedDict() y = OrderedDict()

View File

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

View File

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

View File

@ -68,10 +68,7 @@ def board_not_in(*board):
def no_cpython_compat(): def no_cpython_compat():
try: try:
try: from collections import namedtuple
from collections import namedtuple
except ImportError:
from ucollections import namedtuple
except ImportError: except ImportError:
skip() skip()
try: try: