Skip to content

Feature/recorder integration#1694

Draft
Refael10ru wants to merge 2 commits into
sammchardy:masterfrom
Refael10ru:feature/recorder-integration
Draft

Feature/recorder integration#1694
Refael10ru wants to merge 2 commits into
sammchardy:masterfrom
Refael10ru:feature/recorder-integration

Conversation

@Refael10ru

Copy link
Copy Markdown

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.

Refael10ru and others added 2 commits June 15, 2026 10:02
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant