Skip to content

Commit 184cd9e

Browse files
committed
reinstate test skip logic
1 parent ba8d58b commit 184cd9e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

numcodecs/tests/test_msgpacks.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33

44

55
import numpy as np
6+
import nose
67
from numpy.testing import assert_raises
7-
from numcodecs.msgpacks import MsgPack
8-
from numcodecs.tests.common import (check_config, check_repr,
9-
check_encode_decode_objects)
8+
9+
try:
10+
from numcodecs.msgpacks import MsgPack
11+
except ImportError:
12+
raise nose.SkipTest("msgpack-python not available")
13+
14+
from numcodecs.tests.common import check_config, check_repr, check_encode_decode_objects
1015

1116

1217
# object array with strings
@@ -18,6 +23,7 @@
1823
np.array(['foo', 1.0, 2] * 300, dtype=object),
1924
]
2025

26+
2127
# non-object ndarrays
2228
arrays_incompat = [
2329
np.arange(1000, dtype='i4'),

0 commit comments

Comments
 (0)