| [gw7] darwin -- Python 3.12.12 /Users/cao/.pyenv/versions/3.12.12/bin/python3.12
|
| tests/test_buy_trader_extended_gap_defer.py:149: in test_caps_budget_at_equity_pct
|
| assert total_shares == 163, f"Expected total 163 sh (equity-capped at 15%), got {total_shares}"
|
| E AssertionError: Expected total 163 sh (equity-capped at 15%), got 327
|
| E assert 327 == 163
|
| _capture_add = <function TestExtendedGapDeferEquityCap.test_caps_budget_at_equity_pct.<locals>._capture_add at 0x127e73e20>
|
| add_calls = [{'account_nick': 'cuixia', 'action': 'buy', 'action_end': 180, 'action_start': 30, ...}, {'account_nick': 'cuixia', '...0, 'action_start': 210, ...}, {'account_nick': 'cuixia', 'action': 'buy', 'action_end': 380, 'action_start': 330, ...}]
|
| broker_mock = <MagicMock id='4963727600'>
|
| executor = <rtrader.services.buy_trader_executor.BuyTraderExecutor object at 0x127d9bfe0>
|
| job = BuyTraderJob(job_id='test_pagp_001', symbol='PAGP', metadata={}, audit={}, requested_by=None, raw_payload={'job_id': '...P', 'metadata': {'account_nick': 'cuixia', 'broker_backend': 'alpaca'}, 'audit': {'requested_by': 'test'}}, symbols=[])
|
| next_day = datetime.date(2026, 5, 18)
|
| result = {'chunks': 3, 'gap_days': 3, 'job_id': 'test_pagp_001', 'next_trading_day': '2026-05-18', ...}
|
| self = <tests.test_buy_trader_extended_gap_defer.TestExtendedGapDeferEquityCap object at 0x124db1220>
|
| total_shares = 327
|