- Code including tests should be maintainable and consistent. Read existing code carefully before making changes and follow the existing style and structure.
- Docstring for private methods or functions is not needed unless the logic is complex.
- Log messages, exception messages should NOT be capitalized and NOT end with a period, except for a long message with multiple sentences.
- Don't catch unexpected exceptions in commands, users should be able to see the full traceback when something unexpected happens.
- Do not add docstrings to tests. Comments are permitted when necessary.
- Tests should be grouped in classes.
- Command line tool unit tests should mock API calls. Tests should be simple — verify the command can be executed successfully with expected inputs and outputs.
- Don't write tests relating to
formatterfor commands, it isformattertests' scope. All commands use formatters should use json formatter to validate the output.
- There is an unknown rate limit on API calls. Avoid running API integration tests too frequently. Only run them when your changes directly affect API behaviour. Make requests sent to the API as few as possible.