hacking/releasenotes/notes/migrating-most-common-hacking-checks.yaml
Paras Babbar bfc1a64ac6 Move the most common hacking rules from other projects
This patch will copy the most common hacking rules used in diff.
projects and add them to hacking itself.

Currently, added assert_true_instance, assert_equal_type
assert_raises_regexp, assert_true_or_false_with_in
assert_equal_in

Change-Id: I122d250cab90964c346e9d53046a97c25054bc00
2020-09-29 23:57:52 +00:00

19 lines
649 B
YAML

---
features:
- |
This release added new checks related to unittest module:
* [H211] Change assertTrue(isinstance(A, B)) by optimal assert like
assertIsInstance(A, B).
* [H212] Change assertEqual(type(A), B) by optimal assert like
assertIsInstance(A, B)
* [H213] Check for usage of deprecated assertRaisesRegexp
* [H214] Change assertTrue/False(A in/not in B, message) to the more
specific assertIn/NotIn(A, B, message)
* [H215] Change assertEqual(A in B, True), assertEqual(True, A in B),
assertEqual(A in B, False) or assertEqual(False, A in B) to the more
specific assertIn/NotIn(A, B)