Thanks to visit codestin.com Credit goes to github.com
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.
2 parents 42301ea + c265eb9 commit f9c8ddaCopy full SHA for f9c8dda
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