You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2019/04/11 19:23:14 UTC

[allura] branch master updated: Fix linter test when certain number of files are being linted, and files list is empty

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/master by this push:
     new 0ec3c0d  Fix linter test when certain number of files are being linted, and files list is empty
0ec3c0d is described below

commit 0ec3c0dd0ade7f51d6b11b363893dc8e954af8d2
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Thu Apr 11 15:23:06 2019 -0400

    Fix linter test when certain number of files are being linted, and files list is empty
---
 AlluraTest/alluratest/test_syntax.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/AlluraTest/alluratest/test_syntax.py b/AlluraTest/alluratest/test_syntax.py
index 1db63c9..a77d109 100644
--- a/AlluraTest/alluratest/test_syntax.py
+++ b/AlluraTest/alluratest/test_syntax.py
@@ -108,6 +108,8 @@ def create_many_lint_methods():
 
     for i, files in enumerate(grouper(40, py_files)):
         files = filter(None, files)
+        if not files:
+            continue
 
         lint_test_method = lambda self, these_files=files: run_linter(these_files)
         lint_test_method.__name__ = 'test_pylint_{}'.format(i)
@@ -117,4 +119,5 @@ def create_many_lint_methods():
         pyflake_test_method.__name__ = 'test_pyflakes_{}'.format(i)
         setattr(TestLinters, 'test_pyflakes_{}'.format(i), pyflake_test_method)
 
+
 create_many_lint_methods()