2dadd93d91
Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
518 B
Python
18 lines
518 B
Python
from trade_result_lib import normalize_result_with_pnl
|
|
|
|
|
|
def test_stop_loss_with_profit_becomes_trailing_tp():
|
|
assert normalize_result_with_pnl("止损", 4.33) == "移动止盈"
|
|
|
|
|
|
def test_manual_close_unchanged_even_with_profit():
|
|
assert normalize_result_with_pnl("手动平仓", 10) == "手动平仓"
|
|
|
|
|
|
def test_stop_loss_with_loss_unchanged():
|
|
assert normalize_result_with_pnl("止损", -2.5) == "止损"
|
|
|
|
|
|
def test_take_profit_unchanged():
|
|
assert normalize_result_with_pnl("止盈", 5) == "止盈"
|