Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41007a5

Browse files
committed
Merge pull request #6177 from tacaswell/tst_fix26_compat
TST: conditionally import assert_sequence_equal
2 parents c78ca18 + a0c9759 commit 41007a5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/matplotlib/tests/test_colors.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
from distutils.version import LooseVersion as V
77

88
from nose.tools import assert_raises, assert_equal, assert_true
9-
from nose.tools import assert_sequence_equal
9+
10+
try:
11+
# this is not available in nose + py2.6
12+
from nose.tools import assert_sequence_equal
13+
except ImportError:
14+
assert_sequence_equal = None
1015

1116
import numpy as np
1217
from numpy.testing.utils import assert_array_equal, assert_array_almost_equal
@@ -565,7 +570,8 @@ def test_pandas_iterable():
565570
import pandas as pd
566571
except ImportError:
567572
raise SkipTest("Pandas not installed")
568-
573+
if assert_sequence_equal is None:
574+
raise SkipTest("nose lacks required function")
569575
# Using a list or series yields equivalent
570576
# color maps, i.e the series isn't seen as
571577
# a single color

0 commit comments

Comments
 (0)