File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212from matplotlib .tests import assert_str_equal
1313from matplotlib .testing .decorators import cleanup , knownfailureif
1414from nose .tools import assert_true , assert_raises , assert_equal
15+ from nose .plugins .skip import SkipTest
1516import nose
1617from itertools import chain
1718import numpy as np
@@ -270,10 +271,10 @@ def test_rcparams_reset_after_fail():
270271 # raised an exception due to issues in the supplied rc parameters, the
271272 # global rc parameters were left in a modified state.
272273
273- try :
274+ if sys . version_info [: 2 ] >= ( 2 , 7 ) :
274275 from collections import OrderedDict
275- except ImportError :
276- return # can't run this test on Python 2.6
276+ else :
277+ raise SkipTest ( "Test can only be run in Python >= 2.7 as it requires OrderedDict" )
277278
278279 with mpl .rc_context (rc = {'text.usetex' : False }):
279280
You can’t perform that action at this time.
0 commit comments