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

Skip to content

Commit 30b3410

Browse files
committed
BUG/TST : skip example pep8 if don't know source path
closes #3596
1 parent c439104 commit 30b3410

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/matplotlib/tests/test_coding_standards.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from nose.tools import assert_equal
88
from nose.plugins.skip import SkipTest
9+
from matplotlib.testing.noseclasses import KnownFailureTest
910

1011
try:
1112
import pep8
@@ -256,8 +257,10 @@ def test_pep8_conformance_installed_files():
256257

257258

258259
def test_pep8_conformance_examples():
259-
mpldirdefault = os.path.join(os.getcwd(), '..', '..', '..')
260-
mpldir = os.environ.get('MPL_REPO_DIR', mpldirdefault)
260+
mpldir = os.environ.get('MPL_REPO_DIR', None)
261+
if mpldir is None:
262+
raise KnownFailureTest("can not find the examples")
263+
261264
exdir = os.path.join(mpldir, 'examples')
262265
blacklist = ['color',
263266
'event_handling',

0 commit comments

Comments
 (0)