merge lavoro/goldrake-u4 (revisione 27/09)
This commit is contained in:
@@ -116,7 +116,11 @@ def test_fifo_non_mescola_gli_asset():
|
||||
_f("2026-01-02T00:00:00+00:00", "ETH", "sell", 1.0, 100.0)]
|
||||
rts, aperti = T.fifo_roundtrips(fills)
|
||||
assert rts == [] # la vendita ETH non chiude il long BTC
|
||||
assert set(aperti) == {"BTC"}
|
||||
# (#32 C2) una vendita ETH senza lotti long apre un SHORT — non sparisce piu' in silenzio:
|
||||
# e' comunque isolata dal long BTC, che e' quel che il test verifica.
|
||||
assert set(aperti) == {"BTC", "ETH"}
|
||||
assert aperti["BTC"][0]["direzione"] == "long"
|
||||
assert aperti["ETH"][0]["direzione"] == "short"
|
||||
|
||||
|
||||
def test_fifo_riproduce_il_conto_del_libro_vero():
|
||||
|
||||
Reference in New Issue
Block a user