-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added checks for missing mock usage (#44)
### `R8921`: `mock-no-assign` ``` some_fn(some_arg, create_autospec(ConcreteType), True) ``` Mock not assigned to a variable: XXX. Every mocked object should be assigned to a variable to allow for assertions. To disable this check on a specific line, add `# pylint: disable=mock-no-assign` at the end of it. [[back to top](#pylint-plugin-for-databricks)] ### `R8922`: `mock-no-usage` ``` mocked_thing = create_autospec(ConcreteType) some_fn(some_arg, mocked_thing, True) ``` Missing usage of mock for XXX. Usually this check means a hidden bug, where object is mocked, but we don't check if it was used correctly. Every mock should have at least one assertion, return value, or side effect specified. To disable this check on a specific line, add `# pylint: disable=mock-no-usage` at the end of it.
- Loading branch information
Showing
3 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters