Skip to content

Commit d92adb3

Browse files
authored
Merge pull request #2169 from geimer/protect_test_check_trailing_whitespace
Skip check_trailing_whitespace test if pep8/pycodestyle is not available
2 parents def11b9 + 06f3fa2 commit d92adb3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/framework/style.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ def test_style_conformance(self):
6565

6666
def test_check_trailing_whitespace(self):
6767
"""Test for trailing whitespace check."""
68+
if not ('pycodestyle' in sys.modules or 'pep8' in sys.modules):
69+
print "Skipping trailing whitespace checks (no pycodestyle or pep8 available)"
70+
return
71+
6872
lines = [
6973
"name = 'foo'", # no trailing whitespace
7074
"version = '1.2.3' ", # trailing whitespace

0 commit comments

Comments
 (0)