mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 20:27:15 +01:00
|
Some checks are pending
crdt-sync pre-commit / pre-commit (push) Waiting to run
crdt-sync tests / test (3.10) (push) Waiting to run
crdt-sync tests / test (3.11) (push) Waiting to run
crdt-sync tests / test (3.12) (push) Waiting to run
file length / file-length (push) Waiting to run
palette drift / palette (push) Waiting to run
web_ui tests / test (push) Waiting to run
Second module of the tool/ coverage task. No network and no browser: the callback server is replaced wholesale so consent resolves instantly, and requests.post is mocked at the same boundary test_firebase_auth.py uses. All six TokenError paths are covered, since each names a different misconfiguration and the module docstring exists because they are easy to mistake for one another -- notably the fixed-vs-free port distinction, where a Web client matching redirect URIs exactly fails with redirect_uri_mismatch before the account picker ever appears. Also asserts the server is closed on the failure path, since a leaked listener makes the next run fail to bind. Split across two files because the cap hook rejected the first attempt at 273 lines: the flow tests here, main()'s argument parsing and exit code in _cli.py, which imports the shared fixture values rather than redeclaring them. That is the gate doing its job on this session's own output. Three things the tooling caught, all fixed rather than suppressed: - S105/S106 match on the binding *name*, not the value, so any constant called SECRET/TOKEN/PASSPHRASE trips them however obviously fake it is. Renamed around the rule the way test_firebase_auth.py names _ID_1. - mypy rejected the previous commit's log_message test for asserting on the return of a `-> None` function -- a tautology. Rewritten to make a real request and assert stderr stays empty, which is the only thing that distinguishes the silenced handler from the stock one. - ruff pruned the imports that moved out during the split; verified it took only those, and that the suite is still green afterwards. crdt_sync 268 -> 286 passed, still 100%. Both modules verified at 100% branch individually; the config flip stays last. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| _autherrors.py | ||
| _config.py | ||
| _credentials.py | ||
| _device.py | ||
| _fberrors.py | ||
| _fbkeys.py | ||
| _firebase_auth.py | ||
| _firebase.py | ||
| _gherrors.py | ||
| _github.py | ||
| _hlc.py | ||
| _http.py | ||
| _log.py | ||
| _mirror.py | ||
| _pull.py | ||
| _record.py | ||
| _remote.py | ||
| _revisions.py | ||
| _store.py | ||
| _sync.py | ||
| _syncargs.py | ||
| _syncstate.py | ||