Skip to content

Commit a2cc565

Browse files
authored
docs: update styleguide.md with some prose on testing (#2423)
1 parent a18702b commit a2cc565

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.gemini/styleguide.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,16 @@ error_data = {"function_name": "foo", "message": "bar"}
182182
## Breaking Changes
183183
- Breaking changes must be clearly indicated in the PR title and description.
184184
- PRs with breaking changes should be labeled with the next major version label (e.g., `v8` if current version is 7.x.x).
185+
186+
187+
## Testing
188+
189+
- Most changes require an accompanying test (or tests), depending on PR
190+
severity, especially when new code or a new API is added.
191+
- Bugfixes should always include a test that would previously fail to
192+
guarantee against regression.
193+
- Counter-intuitively, for data classes in the SDK, testing their load/dump
194+
methods should not be done as this is done automatically
195+
(see `tests/tests_unit/test_base.py`). This rule applies to any subclass of
196+
`CogniteObject`, `CogniteResource`, `CogniteUpdate`,
197+
`WriteableCogniteResource` or `WriteableCogniteResourceList`.

0 commit comments

Comments
 (0)