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

Skip to content

Commit 44cebb9

Browse files
committed
Remove python 2.6 workaround in labeled data test
1 parent aad5ad7 commit 44cebb9

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

lib/matplotlib/tests/test_labeled_data_unpacking.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,10 @@
77
# 3.2+ versions
88
from nose.tools import assert_regex, assert_not_regex
99
except ImportError:
10-
try:
11-
# 2.7 versions
12-
from nose.tools import assert_regexp_matches, assert_not_regexp_matches
13-
assert_regex = assert_regexp_matches
14-
assert_not_regex = assert_not_regexp_matches
15-
except ImportError:
16-
# 2.6 versions
17-
def noop(txt, regex):
18-
raise SkipTest("No assert for regex matching in py2.6")
19-
assert_regex = noop
20-
assert_not_regex = noop
10+
# 2.7 versions
11+
from nose.tools import assert_regexp_matches, assert_not_regexp_matches
12+
assert_regex = assert_regexp_matches
13+
assert_not_regex = assert_not_regexp_matches
2114

2215
from ..testing import assert_produces_warning
2316

0 commit comments

Comments
 (0)