mirror of https://github.com/zulip/zulip.git
custom_check: Enforce use of assert_length helper.
This commit is contained in:
parent
352634a851
commit
0ec905ed52
|
@ -267,6 +267,12 @@ python_rules = RuleList(
|
|||
"good_lines": ["assertEqual(1, 2)"],
|
||||
"bad_lines": ["assertEquals(1, 2)"],
|
||||
},
|
||||
{
|
||||
"pattern": "assertEqual[(]len[(][^ ]*[)],",
|
||||
"description": "Use the assert_length helper instead of assertEqual(len(..), ..).",
|
||||
"good_lines": ["assert_length(data, 2)"],
|
||||
"bad_lines": ["assertEqual(len(data), 2)"],
|
||||
},
|
||||
{
|
||||
"pattern": r"#\s*type:\s*ignore(?!\[[^][]+\] +# +\S)",
|
||||
"exclude": {"tools/tests", "zerver/lib/test_runner.py", "zerver/tests"},
|
||||
|
|
Loading…
Reference in New Issue