| [gw5] darwin -- Python 3.12.12 /Users/cao/.pyenv/versions/3.12.12/bin/python3.12
|
| tests/services/test_alpaca_orders_sync.py:113: in test_no_trips_when_position_still_open
|
| trips = compute("cuixia", date(2026, 5, 1), date(2026, 5, 1))
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| _ = <MagicMock id='4969161712'>
|
| buy_at = datetime.datetime(2026, 5, 1, 14, 0, tzinfo=datetime.timezone(datetime.timedelta(days=-1, seconds=72000)))
|
| compute = <function _patched_compute.<locals>._call at 0x1281bed40>
|
| self = <test_alpaca_orders_sync.TestComputeRoundTripsFifoBasic object at 0x124046f90>
|
| tests/services/test_alpaca_orders_sync.py:59: in _call
|
| return mod.compute_round_trips(account, start, end, **kw)
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| account = 'cuixia'
|
| ctx = <MagicMock id='4968847392'>
|
| end = datetime.date(2026, 5, 1)
|
| kw = {}
|
| mod = <module 'rtrader.services.alpaca_orders_sync' from '/Users/cao/robinhood/rtrader/services/alpaca_orders_sync.py'>
|
| start = datetime.date(2026, 5, 1)
|
| rtrader/services/alpaca_orders_sync.py:376: in compute_round_trips
|
| orders = list(coll.find(q, _proj).sort("filled_at", 1).batch_size(5000))
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| E AttributeError: 'list' object has no attribute 'batch_size'
|
| _ET = <DstTzInfo 'America/New_York' LMT-1 day, 19:04:00 STD>
|
| _proj = {'_id': 0, 'alpaca_order_id': 1, 'client_order_id': 1, 'filled_at': 1, ...}
|
| _pytz = <module 'pytz' from '/Users/cao/.pyenv/versions/3.12.12/lib/python3.12/site-packages/pytz/__init__.py'>
|
| account_id = 'ACCT_TEST'
|
| account_nick = 'cuixia'
|
| coll = <MagicMock id='4969161712'>
|
| end_date = datetime.date(2026, 5, 1)
|
| lookback_days = 180
|
| mongo = <MagicMock id='4968847392'>
|
| q = {'account_id': 'ACCT_TEST', 'filled_at': {'$gte': datetime.datetime(2025, 11, 2, 4, 0, tzinfo=datetime.timezone.utc), '$lt': datetime.datetime(2026, 5, 2, 3, 59, 59, tzinfo=datetime.timezone.utc)}, 'status': 'filled'}
|
| start_date = datetime.date(2026, 5, 1)
|
| symbol_filter = None
|
| win_end = datetime.datetime(2026, 5, 2, 3, 59, 59, tzinfo=datetime.timezone.utc)
|
| win_start = datetime.datetime(2025, 11, 2, 4, 0, tzinfo=datetime.timezone.utc)
|