From e1f8d241662cf2c585887ac06d5657999f15dacb Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 16 Nov 2017 13:59:21 -0800 Subject: [PATCH] lint: Fix tools tests. These were broken when Travis wasn't running properly. --- tools/linter_lib/custom_check.py | 2 +- tools/tests/test_linter_custom_check.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index 449c71ff9a..87cc78bea0 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -598,7 +598,7 @@ def build_custom_checkers(by_lang): 'description': 'Linkified markdown URLs should use cleaner syntax.'}, {'pattern': 'https://zulip.readthedocs.io/en/latest/[a-zA-Z0-9]', 'exclude': ['docs/overview/contributing.md', 'docs/overview/readme-symlink.md'], - 'include_only': set(['docs']), + 'include_only': set(['docs/']), 'description': "Use relatve links (../foo/bar.html) to other documents in docs/", }, {'pattern': '\][(][^#h]', diff --git a/tools/tests/test_linter_custom_check.py b/tools/tests/test_linter_custom_check.py index 8f05642abb..8486a1bf05 100644 --- a/tools/tests/test_linter_custom_check.py +++ b/tools/tests/test_linter_custom_check.py @@ -17,7 +17,8 @@ class TestCustomRules(TestCase): # type: () -> None self.all_rules = [] # type: List[Dict[str, Any]] with patch('tools.linter_lib.custom_check.custom_check_file', return_value=False) as mock_custom_check_file: - by_lang = dict.fromkeys(['py', 'js', 'sh', 'css', 'handlebars', 'html', 'json', 'md', 'txt', 'text', 'yaml'], + by_lang = dict.fromkeys(['py', 'js', 'sh', 'css', 'handlebars', 'html', + 'json', 'md', 'txt', 'text', 'yaml', 'rst'], ['foo/bar.baz']) check_custom_checks_py, check_custom_checks_nonpy = build_custom_checkers(by_lang) check_custom_checks_py()