Skip to content

Commit

Permalink
Fixed a FIFO test
Browse files Browse the repository at this point in the history
  • Loading branch information
eprbell committed Feb 2, 2025
1 parent 252c83d commit f3fdd80
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_transfer_analysis_semantics_dependent.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,19 @@ def test_transfer_analysis_success_using_multiple_accounts_and_fifo(self) -> Non
Account("Coinbase", "Bob"): [
InTransactionDescriptor("1", 1, 1, "Coinbase", "Bob", 110, 10, to_lot_unique_ids={Account("Kraken", "Bob"): ["3/-1"]}),
IntraTransactionDescriptor("3", 3, 3, "Coinbase", "Bob", "Kraken", "Bob", 130, 4, 3),
InTransactionDescriptor("4/-2", 4, -2, "Coinbase", "Bob", 120, 1, from_lot_unique_id="2", cost_basis_day=2),
OutTransactionDescriptor("6", 6, 6, "Coinbase", "Bob", 150, 3, 2),
],
Account("Kraken", "Bob"): [
InTransactionDescriptor("3/-1", 3, -1, "Kraken", "Bob", 110, 3, from_lot_unique_id="1", cost_basis_day=1),
InTransactionDescriptor("2", 2, 2, "Kraken", "Bob", 120, 10),
InTransactionDescriptor("2", 2, 2, "Kraken", "Bob", 120, 10, to_lot_unique_ids={Account("Coinbase", "Bob"): ["4/-2"]}),
IntraTransactionDescriptor("4", 4, 4, "Kraken", "Bob", "Coinbase", "Bob", 140, 2, 1),
OutTransactionDescriptor("5", 5, 5, "Kraken", "Bob", 150, 2, 1),
],
},
want_amounts={
Account(exchange='Coinbase', holder='Bob'): {'1': 2},
Account(exchange='Kraken', holder='Bob'): {'2': 8, '3/-1': 0},
Account(exchange='Coinbase', holder='Bob'): {'1': 1},
Account(exchange='Kraken', holder='Bob'): {'2': 5},
},
want_error="",
),
Expand Down

0 comments on commit f3fdd80

Please sign in to comment.