Feature/recorder integration#1694
Draft
Refael10ru wants to merge 2 commits into
Draft
Conversation
- Add pytest-recorder as local path dep (../recorder); no PyPI package yet - Add requests-mock and aioresponses to dev dependencies - Wrap `client` fixture with @record so sync API tests run without network in play mode; 39 recordings committed alongside - Fix call_method_and_assert_uri_contains: skip URI patch when client is a RecordingProxy/PlayerProxy — patch.object on a proxy never reaches the real _request call, so the assertion always failed in record/play mode - Fix test_handle_response: use an inline Client instead of the recorded fixture; _handle_response is pure parsing and its lambda-bearing mock args are not picklable, so the recorder produced an empty recording and PlayerProxy raised RecordingExhausted immediately - Delete empty pytest.ini that silently shadowed pyproject.toml, dropping timeout=90, timeout_method=thread, and asyncio_default_fixture_loop_scope - Remove custom event_loop fixture: pytest-asyncio ≥0.21 runs async fixture teardown on the same loop as the test; the manual fixture caused close_connection() to run on a new asyncio.Runner loop while the aiohttp session's sockets were registered with the test loop's epoll — the new loop's epoll_wait blocked forever, hanging the entire process - Install pytest-timeout so the configured timeout=90 is actually enforced Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…fset The bare constructor leaves timestamp_offset=0, so signed requests use raw local time. When local clock is >1000ms ahead of the Binance server, every signed request fails with APIError(-1021). AsyncClient.create() calls get_server_time() on init and computes the offset, correcting for clock skew automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
optimize testing times by only testing breaking changes
an idea I had originaly implemted in a closed network brought to the outside.
and fitted to work on a cauple of projects to ensure a robustness.
use this pr for critic
I will create a proper pr once the project is more stable.