bank accounts: add validation
bank accounts: add validation: a task in smol-software-harbor (Harbor dataset). Account.deposit() and Account.withdraw() in bank/account.py accept zero and negative amounts (a negative deposit is a hidden withdrawal). Make both raise ValueError("amount must be positive") when amount <= 0 , before…
The task
`Account.deposit()` and `Account.withdraw()` in `bank/account.py` accept zero and negative amounts (a negative deposit is a hidden withdrawal). Make both raise `ValueError("amount must be positive")` when `amount <= 0`, before touching the balance or the history. Run `python3 -m pytest -q`.
Part of efederici/smol-software-harbor.