Skip to content

Gold tests for utils #1004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Gold tests for utils #1004

wants to merge 1 commit into from

Conversation

bobhancockg
Copy link
Contributor

…v19 compatibility

This commit introduces a test suite for the utility modules located in the examples/utils/ directory.

Key changes:

  • Created a new test directory: examples/utils/tests/.
  • Added examples/utils/tests/__init__.py.
  • Added examples/utils/tests/test_example_helpers.py with unit tests for get_printable_datetime and get_image_bytes_from_url using the unittest framework and unittest.mock.
  • Verified that the existing google-ads client library (v26.1.0) already supports Google Ads API v19, so no direct dependency changes for API versioning were required.
  • Updated noxfile.py: Modified the TEST_COMMAND for unittest discover to scan from the project root (-s .) instead of just the top-level tests directory. This ensures the new tests in examples/utils/tests/ are discovered and executed by the standard nox testing sessions.
  • Adjusted the import statement in test_example_helpers.py to from examples.utils import example_helpers to ensure correct module resolution when tests are run from the project root.

…v19 compatibility

This commit introduces a test suite for the utility modules located in the `examples/utils/` directory.

Key changes:
- Created a new test directory: `examples/utils/tests/`.
- Added `examples/utils/tests/__init__.py`.
- Added `examples/utils/tests/test_example_helpers.py` with unit tests for `get_printable_datetime` and `get_image_bytes_from_url` using the `unittest` framework and `unittest.mock`.
- Verified that the existing `google-ads` client library (v26.1.0) already supports Google Ads API v19, so no direct dependency changes for API versioning were required.
- Updated `noxfile.py`: Modified the `TEST_COMMAND` for `unittest discover` to scan from the project root (`-s .`) instead of just the top-level `tests` directory. This ensures the new tests in `examples/utils/tests/` are discovered and executed by the standard `nox` testing sessions.
- Adjusted the import statement in `test_example_helpers.py` to `from examples.utils import example_helpers` to ensure correct module resolution when tests are run from the project root.
@bobhancockg bobhancockg requested a review from a team as a code owner June 2, 2025 10:25
@bobhancockg bobhancockg requested review from Raibaz and dorasun June 2, 2025 10:26
@BenRKarl BenRKarl added the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Jun 5, 2025
@kokoro-team kokoro-team removed the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Jun 5, 2025
@BenRKarl BenRKarl added the kokoro:force-run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kokoro:force-run This label is required to run a kokoro presubmit if an external contributor sends a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy