Updated tests; removed try/catch for ucollections

crypto-aes
bildzeitung 5 years ago
parent a8cc4a1a62
commit bf26ffbf56

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

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

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

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

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

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

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

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

Loading…
Cancel
Save