New paste Repaste Download
self = <tests.test_trading_plan_insufficient_funds_retry.TestBothFailRevertToPending object at 0x1255de5a0>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x125fe0b00>
    def test_full_and_half_fail_reverts_to_pending(self, monkeypatch):
        broker = InsufficientFundsBrokerStub(max_affordable_shares=0)  # all buys fail
        capture = make_capture()
        _patch_common(monkeypatch, broker, capture)
    
        plan = make_plan(shares=10, valid_until="2026-03-18")
        executor.worker_single_plan(plan)
    
        # Broker should have been called twice: 10 shares, then 5 shares
>       assert len(broker.buy_calls) == 2
E       assert 0 == 2
E        +  where 0 = len([])
E        +    where [] = <tests.test_trading_plan_insufficient_funds_retry.InsufficientFundsBrokerStub object at 0x125ece690>.buy_calls
tests/test_trading_plan_insufficient_funds_retry.py:165: AssertionError
Filename: None. Size: 913b. View raw, , hex, or download this file.

This paste expires on 2026-04-01 07:52:08.191389+00:00. Pasted through deprecated-web.