[tor-commits] [stem/master] Test notice not provided when pyflakes/pycodestyle unavailable

atagar at torproject.org atagar at torproject.org
Fri Jun 23 17:56:55 UTC 2017


commit 4e88f0aede7ce0c34ae78f0181474e37ddd409e0
Author: Damian Johnson <atagar at torproject.org>
Date:   Thu Jun 22 10:46:46 2017 -0700

    Test notice not provided when pyflakes/pycodestyle unavailable
    
    Earlier refactoring left an 'if task' check that always evaluated to true,
    causing us to never display a notice when these checks were unavailable.
---
 run_tests.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/run_tests.py b/run_tests.py
index add359e..802a6b4 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -298,15 +298,15 @@ def main():
   static_check_issues = {}
 
   for task in (test.task.PYFLAKES_TASK, test.task.PYCODESTYLE_TASK):
-    if task:
-      task.join()
+    if not task.is_available and task.unavailable_msg:
+      println(task.unavailable_msg, ERROR)
+    else:
+      task.join()  # no-op if these haven't been run
 
       if task.result:
         for path, issues in task.result.items():
           for issue in issues:
             static_check_issues.setdefault(path, []).append(issue)
-    elif not task.is_available and task.unavailable_msg:
-      println(task.unavailable_msg, ERROR)
 
   _print_static_issues(static_check_issues)
 





More information about the tor-commits mailing list