mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 20:54:00 +01:00
android_ui, app_icons, token_audit, focus_policy and random_jpg are now entirely under 250 lines. Only wsg_grabber's six test modules remain in python_pkg. android_ui/driver.py 411 -> 205 took two cuts and a class split: the element and error types plus the XML parser to _elements.py, and the text-entry methods to a TextEntryMixin, using the ABC-with-abstract- methods shape because the tests call them as bound attributes. app_icons/glyphs.py 291 -> 93 by moving the twelve path fragments out. Three intermediate failures, all module-level globals that travelled with their code (_logger, re, _SAME_FIELD_X_TOLERANCE_PX) - the same class of miss as _make_verifier, which ruff cannot flag. Counts unchanged: 81, 137, 14, 44, 57. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
20 lines
1.6 KiB
JSON
20 lines
1.6 KiB
JSON
{
|
|
"title": "Clear five python_pkg packages under the 250-line cap",
|
|
"objective": "Bring token_audit, focus_policy, random_jpg, app_icons and android_ui entirely under the repo-wide 250-line cap, leaving wsg_grabber as the only python_pkg package with violations.",
|
|
"acceptance_criteria": [
|
|
"bash ~/utils/scripts/check_file_length.sh --all lists no file under any of the five packages.",
|
|
"Each package reports its exact baseline pass count: token_audit 81, focus_policy 137, random_jpg 14, app_icons 44, android_ui 57.",
|
|
"Every package keeps 100% branch coverage of its source modules.",
|
|
"AndroidUi stays defined in driver.py, since that is the only name any android_ui test patches on it.",
|
|
"The android_ui class split uses the mixin shape from docs/python-split-recipes.md -- ABC with abstract methods for what the concrete class supplies -- because tests call the moved methods as bound attributes of a real driver.",
|
|
"No assertion is changed and no test is deleted, skipped or weakened.",
|
|
"No suppression is added and no coverage exclusion is introduced."
|
|
],
|
|
"out_of_scope": [
|
|
"Changing what any test asserts, or any adb command the driver issues.",
|
|
"wsg_grabber's six test modules, which are a separate commit.",
|
|
"Changing the public re-exports in android_ui/__init__.py or app_icons' glyph names."
|
|
],
|
|
"verifier": "timeout 120 env PYTHONPATH=. python3 -m pytest python_pkg/<pkg>/tests -q for each of the five (expects 81, 137, 14, 44, 57), plus bash ~/utils/scripts/check_file_length.sh --all showing none of them, plus pre-commit run --files on the touched files."
|
|
}
|