Skip to content

Commit

Permalink
this test fails: test_chain_must_not_corrupt_the_argument
Browse files Browse the repository at this point in the history
  • Loading branch information
epogrebnyak committed Dec 17, 2023
1 parent 2aec10d commit 1bd402b
Show file tree
Hide file tree
Showing 5 changed files with 238 additions and 352 deletions.
271 changes: 0 additions & 271 deletions experimental/test_composer.py

This file was deleted.

5 changes: 4 additions & 1 deletion x/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ def credit(self, amount: Amount):
self.credits.append(amount)
return self

def debit_and_credit(self):
return sum(self.debits), sum(self.credits)

def deep_copy(self):
"""Replicate this account as new data structure."""
return self.__class__(self.debits.copy(), self.credits.copy())
return self.__class__([x for x in self.debits], [x for x in self.credits])

def condense(self):
"""Create a new account of the same type with only one value as account balance."""
Expand Down
Loading

0 comments on commit 1bd402b

Please sign in to comment.