diff --git a/tests/test_context.py b/tests/test_context.py index 28ac129..1a30e6c 100644 --- a/tests/test_context.py +++ b/tests/test_context.py @@ -739,7 +739,7 @@ def test_set_pos_ctx_data( def test_cancel_pending_order(ctx, pending_orders): - ctx.cancel_pending_order(pending_orders[0].id) + assert ctx.cancel_pending_order(pending_orders[0].id) orders = tuple(ctx.pending_orders()) assert orders == tuple([pending_orders[1]]) diff --git a/tests/test_portfolio.py b/tests/test_portfolio.py index bf813de..4dab8d6 100644 --- a/tests/test_portfolio.py +++ b/tests/test_portfolio.py @@ -2760,7 +2760,7 @@ def test_remove_stop(): limit_price=None, stops=stops, ) - portfolio.remove_stop(1) + assert portfolio.remove_stop(1) portfolio.incr_bars() portfolio.check_stops(DATE_2, price_scope) assert len(portfolio.long_positions) == 1 diff --git a/tests/test_scope.py b/tests/test_scope.py index 48bdf2e..df2808f 100644 --- a/tests/test_scope.py +++ b/tests/test_scope.py @@ -427,7 +427,7 @@ def test_fetch(self, price, expected_price): class TestPendingOrderScope: def test_remove(self, pending_orders, pending_order_scope): - pending_order_scope.remove(pending_orders[0].id) + assert pending_order_scope.remove(pending_orders[0].id) orders = tuple(pending_order_scope.orders()) assert len(orders) == 1 assert orders[0] == pending_orders[1] diff --git a/tests/test_strategy.py b/tests/test_strategy.py index e193955..cd9f647 100644 --- a/tests/test_strategy.py +++ b/tests/test_strategy.py @@ -1867,7 +1867,7 @@ def exec_fn(ctx): ctx.buy_shares = 100 ctx.stop_loss = 10 elif ctx.bars == 10: - ctx.cancel_stop(stop_id=1) + assert ctx.cancel_stop(stop_id=1) df = data_source_df[data_source_df["symbol"] == "SPY"] dates = df["date"].unique()