lint: Fix tools tests.

These were broken when Travis wasn't running properly.
This commit is contained in:
Tim Abbott 2017-11-16 13:59:21 -08:00
parent 6a72fcff9c
commit e1f8d24166
2 changed files with 3 additions and 2 deletions

View File

@ -598,7 +598,7 @@ def build_custom_checkers(by_lang):
'description': 'Linkified markdown URLs should use cleaner <http://example.com> 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]',

View File

@ -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()