8000 BUG/TST : skip example pep8 if don't know source path by tacaswell · Pull Request #3597 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

BUG/TST : skip example pep8 if don't know source path #3597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 17, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions lib/matplotlib/tests/test_coding_standards.py
89F9
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from nose.tools import assert_equal
from nose.plugins.skip import SkipTest
from matplotlib.testing.noseclasses import KnownFailureTest

try:
import pep8
Expand Down Expand Up @@ -256,8 +257,21 @@ def test_pep8_conformance_installed_files():


def test_pep8_conformance_examples():
mpldirdefault = os.path.join(os.getcwd(), '..', '..', '..')
mpldir = os.environ.get('MPL_REPO_DIR', mpldirdefault)
mpldir = os.environ.get('MPL_REPO_DIR', None)
if mpldir is None:
# try and guess!
fp = os.getcwd()
while len(fp) > 2:
if os.path.isdir(os.path.join(fp, 'examples')):
mpldir = fp
break
fp, tail = os.path.split(fp)

if mpldir is None:
raise KnownFailureTest("can not find the examples, set env "
"MPL_REPO_DIR to point to the top-level path "
"of the source tree")

exdir = os.path.join(mpldir, 'examples')
blacklist = ['color',
'event_handling',
Expand Down
0