[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 4e88f0aede7ce0c34ae78f0181474e37ddd409e0
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
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)
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits