Skip to content

test: add missing unit tests for untested modules#586

Open
irhyl wants to merge 1 commit intogoogle-deepmind:mainfrom
gsoc-2026:test/add-missing-unit-tests
Open

test: add missing unit tests for untested modules#586
irhyl wants to merge 1 commit intogoogle-deepmind:mainfrom
gsoc-2026:test/add-missing-unit-tests

Conversation

@irhyl
Copy link

@irhyl irhyl commented Feb 22, 2026

Add tests for modules that previously had zero test coverage:

  • gemma/gm/losses/_dpo_test.py: DPO loss shape, non-negativity, label smoothing
  • gemma/gm/losses/_npo_test.py: NPO loss shape, non-negativity, tau scaling
  • gemma/gm/ckpts/_paths_test.py: CheckpointPath enum validation, naming conventions
  • gemma/gm/math/_pos_utils_test.py: build_positions_from_mask correctness
  • gemma/gm/utils/_py_test.py: FrozenDataclass equality, hashing, sets/dicts
  • gemma/gm/tools/_manager_test.py: ToolHandlerBase context manager, _normalize_response
  • gemma/gm/data/_tasks_test.py: _decode_bytes helper

Add tests for modules that previously had zero test coverage:

- gemma/gm/losses/_dpo_test.py: DPO loss shape, non-negativity, label smoothing
- gemma/gm/losses/_npo_test.py: NPO loss shape, non-negativity, tau scaling
- gemma/gm/ckpts/_paths_test.py: CheckpointPath enum validation, naming conventions
- gemma/gm/math/_pos_utils_test.py: build_positions_from_mask correctness
- gemma/gm/utils/_py_test.py: FrozenDataclass equality, hashing, sets/dicts
- gemma/gm/tools/_manager_test.py: ToolHandlerBase context manager, _normalize_response
- gemma/gm/data/_tasks_test.py: _decode_bytes helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant