We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42301ea commit c265eb9Copy full SHA for c265eb9
lib/matplotlib/tests/test_coding_standards.py
@@ -3,7 +3,14 @@
3
import sys
4
5
from nose.tools import assert_equal
6
-import pep8
+from nose.plugins.skip import SkipTest
7
+
8
+try:
9
+ import pep8
10
+except ImportError:
11
+ HAS_PEP8 = False
12
+else:
13
+ HAS_PEP8 = True
14
15
import matplotlib
16
@@ -172,6 +179,9 @@ def _test_pep8_conformance():
172
179
# The file should be a line separated list of filenames/directories
173
180
# as can be passed to the "pep8" tool's exclude list.
174
181
182
+ if not HAS_PEP8:
183
+ raise SkipTest('The pep8 tool is required for this test')
184
175
185
# Only run this test with Python 2 - the 2to3 tool generates non pep8
176
186
# compliant code.
177
187
if sys.version_info[0] != 2:
0 commit comments