Skip to content

Add unit tests for sampling and text utilities#277

Open
jaisinha77777 wants to merge 1 commit into
google-deepmind:mainfrom
jaisinha77777:add-tests-sampling-text
Open

Add unit tests for sampling and text utilities#277
jaisinha77777 wants to merge 1 commit into
google-deepmind:mainfrom
jaisinha77777:add-tests-sampling-text

Conversation

@jaisinha77777

Copy link
Copy Markdown

Adds unit test coverage for two previously untested helper modules:

  • concordia/utils/sampling.pyextract_choice_response (single-char, trailing paren/period, parenthesized-in-string, and no-match cases) and dynamically_adjust_temperature (below / at / above the attempt midpoint).
  • concordia/utils/text.pywrap (width handling, newline preservation, empty input) and truncate (max_length, delimiters, and combined).

All 31 tests pass locally via python -m pytest concordia/utils/sampling_test.py concordia/utils/text_test.py.

Adds coverage for concordia/utils/sampling.py (extract_choice_response, dynamically_adjust_temperature) and concordia/utils/text.py (wrap, truncate).
@google-cla

google-cla Bot commented Jun 29, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@jaisinha77777

Copy link
Copy Markdown
Author

@googlebot I signed it!

2 similar comments
@jaisinha77777

Copy link
Copy Markdown
Author

@googlebot I signed it!

@jaisinha77777

Copy link
Copy Markdown
Author

@googlebot I signed it!

@jaisinha77777

Copy link
Copy Markdown
Author

Hi maintainers,

All CI checks, CLA verification, and tests are passing successfully. This PR adds unit test coverage for previously untested utility functions .

I would appreciate any feedback or review when convenient. Thanks for your time!

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