[tor-commits] [stem/master] Prompting testers to install pep8 if unavailable
atagar at torproject.org
atagar at torproject.org
Mon Jan 7 09:07:59 UTC 2013
commit 3ef0964914f670c05252ad139f88611b636aab37
Author: Damian Johnson <atagar at torproject.org>
Date: Sun Jan 6 19:34:58 2013 -0800
Prompting testers to install pep8 if unavailable
Style checks will require pep8 so prompting the user to install it if it's
unavailable when they run with '--style'.
---
run_tests.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/run_tests.py b/run_tests.py
index 9675706..ed95af3 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -466,9 +466,12 @@ if __name__ == '__main__':
style_issues.update(test.check_whitespace.get_issues(os.path.join(base_path, "run_tests.py")))
if CONFIG["argument.style"]:
- style_issues.update(test.check_whitespace.pep8_issues(os.path.join(base_path, "stem")))
- style_issues.update(test.check_whitespace.pep8_issues(os.path.join(base_path, "test")))
- style_issues.update(test.check_whitespace.pep8_issues(os.path.join(base_path, "run_tests.py")))
+ if system.is_available("pep8"):
+ style_issues.update(test.check_whitespace.pep8_issues(os.path.join(base_path, "stem")))
+ style_issues.update(test.check_whitespace.pep8_issues(os.path.join(base_path, "test")))
+ style_issues.update(test.check_whitespace.pep8_issues(os.path.join(base_path, "run_tests.py")))
+ else:
+ test.output.print_line("Style checks require pep8. Please install it from 'http://pypi.python.org/pypi/pep8'.")
if style_issues:
test.output.print_line("STYLE ISSUES", term.Color.BLUE, term.Attr.BOLD)
More information about the tor-commits
mailing list