Repository navigation
Release v1.2.2 - #177
Merged
Merged
Release v1.2.2#177
Conversation
Why: * instrument polling and error branches were only exercised against the live capsolver api, so __get_result and the error paths stayed uncovered whenever the live suite cannot run What: * cover the full processing/polling lifecycle of SIOCaptchaInstrument and AIOCaptchaInstrument with scripted responses at the http boundary: ready-at-creation without polling, polling until ready/failed with taskId propagation, rejected creation marked failed, invalid status codes raising, the 15-attempt silent-server unsolvable default, and send_post_request success/error * cover failed url download returning empty base64 in FileInstrument * register the new test files in the tests/AGENTS.md layout Changes: * tests/test_sio_captcha_instrument.py: new mocked suite (11 test items) * tests/test_aio_captcha_instrument.py: new mocked suite (11 test items) * tests/test_instrument.py: add aio download-failure test, use plain membership checks * tests/AGENTS.md: list the two new test files Stats: * 4 files changed * +389/-2 lines Co-authored-by: Claude <noreply@anthropic.com>
Why: * the quoted "CaptchaParams" forward references in both instruments resolved to no import, so static analysis flagged them as undefined * Optional[...] and quoted annotations predate lazy annotation support What: * add a TYPE_CHECKING-guarded CaptchaParams import to break the annotation-only import cycle with base.py * add from __future__ import annotations and switch the single Optional[dict] parameter to dict | None (lazy, so python 3.8+ stays supported) * unquote the CaptchaParams parameter annotation no runtime behavior change: the guard never executes and annotations are never evaluated; the full mocked suite passes identically Changes: * src/python3_capsolver/core/sio_captcha_instrument.py: typing hygiene * src/python3_capsolver/core/aio_captcha_instrument.py: typing hygiene Stats: * 2 files changed * +10/-4 lines Co-authored-by: Claude <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release #177 +/- ##
============================================
+ Coverage 88.51% 99.79% +11.27%
============================================
Files 22 22
Lines 479 481 +2
============================================
+ Hits 424 480 +56
+ Misses 55 1 -54 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.