[stem/master] Checking for pep8.BaseReport

commit 68979148f1e09b7bca22bde876524029f419d1e5 Author: Damian Johnson <atagar@torproject.org> Date: Sat Jan 4 12:21:42 2014 -0800 Checking for pep8.BaseReport Our jenkins tests are also failing because they have the pep8 module, but it lacks the BaseReport. Checking for that as well. --- run_tests.py | 4 ++-- test/util.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/run_tests.py b/run_tests.py index b0b3171..9559311 100755 --- a/run_tests.py +++ b/run_tests.py @@ -294,12 +294,12 @@ def main(): if pyflakes_task and pyflakes_task.is_successful: static_check_issues.update(pyflakes_task.result) elif not test.util.is_pyflakes_available(): - println("Static error checking requires pyflakes. Please install it from ...\n http://pypi.python.org/pypi/pyflakes\n", ERROR) + println("Static error checking requires pyflakes version 0.7.3 or later. Please install it from ...\n http://pypi.python.org/pypi/pyflakes\n", ERROR) if pep8_task and pep8_task.is_successful: static_check_issues.update(pep8_task.result) elif not test.util.is_pep8_available(): - println("Style checks require pep8. Please install it from...\n http://pypi.python.org/pypi/pep8\n", ERROR) + println("Style checks require pep8 version 1.4.2 or later. Please install it from...\n http://pypi.python.org/pypi/pep8\n", ERROR) _print_static_issues(static_check_issues) diff --git a/test/util.py b/test/util.py index d510d6f..cfa0b95 100644 --- a/test/util.py +++ b/test/util.py @@ -182,6 +182,10 @@ def is_pep8_available(): try: import pep8 + + if not hasattr(pep8, 'BaseReport'): + raise ImportError() + return True except ImportError: return False
participants (1)
-
atagar@torproject.org