ShousenZHANG opened a new pull request, #72975:
URL: https://github.com/apache/airflow/pull/72975

   `providers/google/tests/unit/google/cloud/links/test_translate.py` was 
listed in `OVERLOOKED_TESTS`, so its 12 link classes had no coverage.
   
   Adds the checks the sibling link tests use, for each class:
   
   - `test_class_attributes` — `key`, `name`, `format_str`
   - `test_persist` — the XCom payload pushed by `BaseGoogleLink.persist`
   - `test_format_link` — the `_format_link` output
   
   `TranslateTextBatchLink` and `TranslateResultByOutputConfigLink` override 
`persist`: they take an `output_config` and push the `gs://`-stripped 
`output_uri_prefix`. Both that and `extract_output_uri_prefix` are covered.
   
   Several legacy/native constant pairs currently hold identical strings 
(`TRANSLATION_LEGACY_DATASET_LINK` / `TRANSLATION_NATIVE_DATASET_LINK`, and the 
model pair), so each test asserts against the constant its own class references 
rather than a shared literal.
   
   Same shape as `test_bigquery.py` (added in #68066) in the same directory, 
and the `OVERLOOKED_TESTS` entry is removed in this PR.
   
   related: #35442
   
   ### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes
   
   `Generated-by: Claude Code`
   
   The test bodies were written by an AI assistant following the existing 
`test_bigquery.py` pattern in the same directory. I verified them myself:
   
   - `pytest providers/google/tests/unit/google/cloud/links/test_translate.py` 
— 38 passed
   - `pytest airflow-core/tests/unit/always/test_project_structure.py` — 10 
passed, 1 xfailed
   - `ruff check` / `ruff format --check` on the test file — clean
   - `prek run --files 
providers/google/tests/unit/google/cloud/links/test_translate.py 
airflow-core/tests/unit/always/test_project_structure.py` — 43 passed, 212 
skipped, 0 failed
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to