Development
.venv/bin/ruff check . && .venv/bin/ruff format --check .
.venv/bin/pytest -m "not integration"The protocol client is tested against an in-memory fake that drives
asyncio.StreamReader directly (tests/fakes.py), so the full suite runs with
no network and asserts on the exact bytes written to the wire.
tests/test_proto.py asserts "twisted" not in sys.modules so Twisted cannot
creep back into the dependency tree.
Integration suite
The integration suite needs a real demo account and is skipped by default:
CTRADER_INTEGRATION=1 .venv/bin/pytest -m integrationIt is the only thing that can settle the protocol facts the specification does not state — whether trendbars are bid-side or mid, and whether the forming bar is included in a history response.
It has never been run, so both remain open. Run it before trusting the
service; the answers get recorded in src/ctrader/decode.py.
Last updated on